# Screenshot one element of a page

> Capture one part of a web page instead of all of it: a chart, a pricing table, a card. Name the element with a CSS selector and get an image of it alone.

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.

Page for people: https://curlshot.com/tools/element-screenshot

## 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.

## 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

## The same thing with the API

```bash
curl "https://curlshot.com/api/v1/screenshot?access_key=YOUR_ACCESS_KEY&url=https://example.com&selector=p" \
  --output element.png
```

An access key is free: https://curlshot.com/register. Read more:

- [Capture one element](https://curlshot.com/docs/element.md)
- [Customize the page](https://curlshot.com/docs/customize.md)

## Questions

### 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.

## Related

- [Full-page screenshot](https://curlshot.com/tools/full-page-screenshot.md): Take 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.
- [Screenshot API](https://curlshot.com/tools/screenshot-api.md): A 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.
- [HTML to image](https://curlshot.com/tools/html-to-image.md): Render your own HTML, CSS or Markdown into an image or a PDF with one API request. For social cards, certificates, receipts and reports.
