Screenshot one element of a page
To screenshot one element of a web page, add a CSS selector to a CurlShot request, for example selector=h1 or selector=.pricing-table. CurlShot opens the page, finds the first element that matches and returns an image of that element alone, cropped to its edges. To cut out a fixed area instead, give its position and size in pixels.
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com&selector=p" \
--output element.pngHow to screenshot one element of a web page in three steps
- 1
Create a free account and copy your access key.
- 2
Find the CSS selector of the element: its id, its class or its tag.
- 3
Add selector to the request and save the image that comes back.
A CSS selector or a rectangle: which to use
There are two ways to capture part of a page. A selector follows the element wherever it is; a rectangle cuts out the same pixels every time. Use one or the other: sending both is refused.
Show the table (5 rows)
| Compare | selector | clip_x, clip_y, clip_width, clip_height |
|---|---|---|
| You give | A CSS selector, such as #pricing or .infobox | A position and a size in pixels, from the top left of the page |
| The image is | The first matching element, cropped to its edges | Exactly that rectangle |
| Survives layout changes | Yes, as long as the selector matches | No: a moved element leaves the rectangle |
| Nothing there | selector_not_found (422), not counted against your quota | You get whatever is in that area |
| Formats | png, jpeg, webp | png, jpeg, webp |
- An element that appears late: add wait_for_selector with the same selector.
- A transparent background around a logo or a badge: omit_background=true with png or webp.
- Test the selector first in your browser console with document.querySelector.
- Write # as %23 in a GET request, or send the request as POST.

What people use it for
- A chart or a dashboard tile as an image for a report or an email
- A pricing table, a testimonial or a product card on its own
- One component of your app for the docs
- Watching one part of a page for changes
For developers: one request
The same thing from your own code. It is a plain HTTP request, so it works from any language. Create a free account to get an access key.
Questions people ask
How do I take a screenshot of a specific element?
Add selector to a CurlShot request with the CSS selector of the element. The image contains that element and nothing else.
What if the element appears late?
Add wait_for_selector with the same selector. The screenshot is taken only after the element is visible.
Can I capture an area by coordinates?
Yes. clip_x, clip_y, clip_width and clip_height cut out a rectangle of the page, measured in pixels from its top left corner.
Can I hide things inside or around the element?
Yes. hide_selectors hides any elements you name, and styles adds your own CSS to the page before the screenshot.
Guides that go deeper
- PlaygroundCSS selectors for element screenshotsType a CSS selector, see what it matches on a specimen page and what a capture returns. With a cheat sheet, a robustness ranking and fixes.
- PlaybookWebsite change monitoring with screenshotsHow to get told when a web page changes: the capture and compare loop, three ways to detect a change, a noise checklist, a cron and Node.js setup, and tools.
Related tools
- Screenshot APIA screenshot API for developers. One HTTP request turns a URL, HTML or Markdown into a PNG, JPEG, WebP or PDF. Full page, devices, blocking, cache, MCP.
- Full-page screenshotTake a screenshot of a whole web page, from the top to the very bottom, as one image. Paste the address, nothing to install. Also available as an API.
- HTML to imageRender your own HTML, CSS or Markdown into an image or a PDF with one API request. For social cards, certificates, receipts and reports.