# One Element Only

A capture of one element (selector=h1) on example.com: only the heading, not the page.

Source: https://docs.deepinfo.com/reference/lookup/screenshot/examples/selector/

Last updated: 2026-09-24

---
`GET https://api.deepinfo.com/v1/lookup/screenshot?url=https%3A%2F%2Fexample.com&selector=h1`

A capture of one element (selector=h1) on example.com: only the heading, not the page.

Example 1 of 3 in **What to Capture** · [Screenshot Examples](/reference/lookup/screenshot/examples/) · endpoint: [Screenshot](/reference/lookup/screenshot/)

Tags: `param` `url` · `param` `selector` · `value` `https://example.com` · `value` `h1`

Asks for only the `h1` element of `https://example.com` (`selector=h1`).

When the CSS selector matches, the image shows just that element, here the page's main heading. The file name in `screenshot_url` starts with the host name and ends with a random part: `example-com-KRtHxyMHRgA8gMlUSlbV7dC7.jpeg`.

## Request

| Parameter | In | Value |
|---|---|---|
| `url` | query | `https://example.com` |
| `selector` | query | `h1` |

```bash
curl 'https://api.deepinfo.com/v1/lookup/screenshot?url=https%3A%2F%2Fexample.com&selector=h1' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

## Response

### 200 · OK

`Content-Type: application/json; charset=utf-8` · `ratelimit-limit: 1` · `ratelimit-remaining: 0` · `ratelimit-reset: 1` · `x-ratelimit-limit-second: 1` · `x-ratelimit-remaining-second: 0` · `deepinfo-request-id: 5f0c6a8e-1b2d-4c3e-9f4a-7b8c9d0e1f2a`

```json
{
  "url": "https://example.com",
  "redirected_url": "https://example.com/",
  "check_date": "2026-09-24T07:57:06.466Z",
  "connection_status": "success",
  "screenshot_url": "https://diss-999.storage.googleapis.com/202609/24/example-com-KRtHxyMHRgA8gMlUSlbV7dC7.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=<redacted>&X-Amz-Date=20260924T075706Z&X-Amz-Expires=604800&X-Amz-Signature=<redacted>&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
```

## Related Examples

- [Inject a Stylesheet by URL](/reference/lookup/screenshot/examples/css-url/)
- [Default Screenshot](/reference/lookup/screenshot/examples/default/)
