# Screenshot Page

Capture a host-rendered JPEG screenshot of a public viewport or full page through the typed internal browser acquisition boundary.

- Platform: [Universal Web](https://docs.upscrape.com/docs/platforms/web)
- Capability ID: `web.page.screenshot`
- Cost: 1 credit per request
- Maximum runtime: 120 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "format": "jpeg",
    "full_page": true,
    "url": "https://example.com/",
    "viewport_height": 900,
    "viewport_width": 1440
  },
  "capability": "web.page.screenshot"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `format` | `string` | No | The current Agent browser node returns bounded JPEG artifacts. |
| `full_page` | `boolean` | No |  |
| `url` | `string` | Yes | Public http(s) page URL to render. |
| `viewport_height` | `integer` | No |  |
| `viewport_width` | `integer` | No |  |
| `wait_for_selector` | `string` | No |  |
| `wait_ms` | `integer` | No |  |

### Example input

```json
{
  "format": "jpeg",
  "full_page": true,
  "url": "https://example.com/",
  "viewport_height": 900,
  "viewport_width": 1440
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This redacted fixture is an example, not a fixed response schema.

```json
{
  "capture_backend": "host_browser_acquisition",
  "captured_at": "2026-08-23T23:50:15.602143Z",
  "content_type": "image/jpeg",
  "final_url": "https://example.com/",
  "full_page": true,
  "height": 900,
  "image": {
    "bytes": 15561,
    "content_type": "image/jpeg",
    "data": "/9j/4AAQSkZJRgABAQAAAQABAAD/[redacted:token]/[redacted:token]+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//[redacted:token]//wAARCAOEBaADASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAMGAgQFAQf/xAA/[redacted:token]/EABYBAQEBAAAAAAAAAAAAAAAAAAABAv/[redacted:token]/[redacted:token]/[redacted:token]+bLWIrP44mZkHZFXp8ddHtlis49ulJnj1bY47f9+f8Oj1f4i0ekfLTsxlvTZ80vjiJiI8eZ8/z9AdcVvD8b9GyZrUvbPhisTMXyY/FvxxMz/hP0r4r6b1…",
    "encoding": "base64",
    "filename": "screenshot.jpg",
    "kind": "screenshot",
    "sha256": "[redacted:token]"
  },
  "rendered": true,
  "stats": {
    "elapsed_ms": 4685,
    "format": "jpeg",
    "image_bytes": 15561,
    "transport": "host_browser_acquisition",
    "viewport_height": 900,
    "viewport_width": 1440
  },
  "status_code": 200,
  "url": "https://example.com/",
  "warnings": [],
  "width": 1440
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `capture_backend` | `string` | host_browser_acquisition |
| `captured_at` | `string` | 2026-08-23T23:50:15.602143Z |
| `content_type` | `string` | image/jpeg |
| `final_url` | `string` | https://example.com/ |
| `full_page` | `boolean` | true |
| `height` | `integer` | 900 |
| `image` | `object` | 7 fields |
| `image.bytes` | `integer` | 15561 |
| `image.content_type` | `string` | image/jpeg |
| `image.data` | `string` | /9j/4AAQSkZJRgABAQAAAQABAAD/[redacted:token]/[redacted:token]+MzZGNywtQ… |
| `image.encoding` | `string` | base64 |
| `image.filename` | `string` | screenshot.jpg |
| `image.kind` | `string` | screenshot |
| `image.sha256` | `string` | [redacted:token] |
| `rendered` | `boolean` | true |
| `stats` | `object` | 6 fields |
| `stats.elapsed_ms` | `integer` | 4685 |
| `stats.format` | `string` | jpeg |
| `stats.image_bytes` | `integer` | 15561 |
| `stats.transport` | `string` | host_browser_acquisition |
| `stats.viewport_height` | `integer` | 900 |
| `stats.viewport_width` | `integer` | 1440 |
| `status_code` | `integer` | 200 |
| `url` | `string` | https://example.com/ |
| `warnings` | `array` | 0 items |
| `width` | `integer` | 1440 |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
