All variants accept shared browse options (device, wait_for_selector, robots, …).
Binary capture
POST
/v1/screenshotAPI keyReturns image/jpeg, image/png, or application/pdf bytes. 8 credits.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | required | Public http(s) URL to capture. |
mode | viewport | fullpage | optional | Default fullpage. |
format | jpeg | png | pdf | optional | Default jpeg. |
quality | 1–100 | optional | JPEG quality. |
width / height | number | optional | Viewport (defaults 1280×800). Overridden by device. |
max_page_height | number | optional | Cap fullpage height. |
wait_ms | number | optional | Extra settle delay after load. |
curl -X POST https://scout.macrocontent.dev/v1/screenshot \
-H "Authorization: Bearer sk_scout_…" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","format":"jpeg","mode":"fullpage"}' \
--output shot.jpgSuccess is a binary body with the matching Content-Type (not JSON). Non-2xx responses are JSON errors — see Errors.
JSON + optional HAR
POST
/v1/screenshot/jsonAPI keyBase64 payload plus metadata; set record_har true for HAR. 8 credits.
{
"url": "https://example.com",
"format": "jpeg",
"device": "iPhone 13",
"wait_for_selector": "main",
"record_har": false
}Example response:
{
"status": "success",
"url": "https://example.com",
"final_url": "https://example.com/",
"capture_height": 2400,
"content_type": "image/jpeg",
"image_base64": "/9j/4AAQSkZJRgABAQ…",
"har_base64": null,
"timestamp": "2026-07-21T15:00:00.000Z"
}Field name
The image field is
image_base64 (not base64). Set include_image: false to omit it (metadata / HAR only). Multi-viewport
POST
/v1/screenshot/viewportsAPI keyOne shot per viewport entry. Cost: 8 × count (max 8). Entries may use device presets.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | required | Target URL. |
viewports | array | required | 1–8 entries with name + width/height or device. |
viewports[].device | string | optional | Preset name from GET /v1/devices. |
{
"url": "https://example.com",
"viewports": [
{ "name": "desktop", "width": 1280, "height": 800 },
{ "name": "phone", "device": "iPhone 13" }
]
}Example response (truncated):
{
"status": "success",
"url": "https://example.com",
"final_url": "https://example.com/",
"shots": [
{ "name": "desktop", "width": 1280, "height": 800, "content_type": "image/jpeg", "base64": "…" },
{ "name": "phone", "width": 390, "height": 844, "content_type": "image/jpeg", "base64": "…" }
],
"timestamp": "…"
}Pixel diff
POST
/v1/screenshot/diffAPI keyDiff live capture vs client-supplied PNG (base64). Pass tolerance for pass/fail. 10 credits.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | required | Live page to capture. |
reference_png_base64 | string | required | Baseline PNG as base64. |
tolerance | number | optional | Allowed differing pixel ratio / threshold for pass. |
{
"url": "https://example.com",
"reference_png_base64": "<png-base64>",
"tolerance": 0.01
}Example response:
{
"status": "success",
"pass": true,
"diff_ratio": 0.0021,
"tolerance": 0.01,
"width": 1280,
"height": 800,
"diff_png_base64": "iVBORw0KGgo…",
"timestamp": "…"
}