GET Download Screenshot
Download a viewport or full-page screenshot captured during a scrape
https://api.anakin.io/v1/url-scraper/{id}/screenshotDownload the PNG screenshot captured for a completed scrape job. This endpoint streams the raw image bytes — it is not a public S3 link. Every request must be authenticated with your API key, and you can only fetch screenshots for jobs your key owns.
You get here from the job result: when you request the screenshot and/or screenshotFullPage formats, the completed job returns screenshotUrl and fullPageScreenshotUrl, both of which point at this endpoint.
Capture → Download Flow
- Submit a scrape with a screenshot format — this auto-enables the headless browser:
{ "url": "https://example.com", "formats": ["screenshot", "screenshotFullPage"] } - Poll the job until
statusiscompleted. The result includesscreenshotUrl(viewport) andfullPageScreenshotUrl(full page). GETthat URL with yourX-API-Keyheader to download the PNG.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id required | string | The job ID whose screenshot you want. For batch jobs, use the per-result child job ID from the batch response. |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
type optional | string | viewport (default) or fullpage. Must match a format that was requested when the job was submitted. Any other value returns 400. |
Authentication
This endpoint is API-key authenticated and ownership-scoped — it is not open. You must send your API key on every request (X-API-Key: your_api_key). Requests with no key return 401; requests for a job that your key does not own return 403.
The screenshotUrl / fullPageScreenshotUrl fields returned by the job-status endpoint are download endpoints on api.anakin.io, not pre-signed S3 URLs — pasting them into a browser without your API key header will fail with 401.
Response
200 OKRaw PNG image bytes.
| Header | Value |
|---|---|
Content-Type | image/png |
Cache-Control | private, max-age=300 |
| Status | Meaning |
|---|---|
200 | Screenshot streamed as image/png. |
400 | Missing id, or type is not viewport/fullpage. |
401 | Missing or invalid API key. |
403 | The job exists but is not owned by your API key. |
404 | Job or requested screenshot does not exist (e.g. the format wasn't requested, or the job hasn't completed). |
Code Examples
# Viewport screenshot (default)
curl -X GET "https://api.anakin.io/v1/url-scraper/job_abc123xyz/screenshot" \
-H "X-API-Key: your_api_key" \
--output screenshot.png
# Full-page screenshot
curl -X GET "https://api.anakin.io/v1/url-scraper/job_abc123xyz/screenshot?type=fullpage" \
-H "X-API-Key: your_api_key" \
--output fullpage.pngimport requests
job_id = "job_abc123xyz"
resp = requests.get(
f'https://api.anakin.io/v1/url-scraper/{job_id}/screenshot',
headers={'X-API-Key': 'your_api_key'},
params={'type': 'viewport'}, # or 'fullpage'
)
resp.raise_for_status()
with open('screenshot.png', 'wb') as f:
f.write(resp.content)const jobId = 'job_abc123xyz';
const res = await fetch(
`https://api.anakin.io/v1/url-scraper/${jobId}/screenshot?type=viewport`,
{ headers: { 'X-API-Key': 'your_api_key' } }
);
if (!res.ok) throw new Error(`Screenshot fetch failed: ${res.status}`);
const buffer = Buffer.from(await res.arrayBuffer());
require('fs').writeFileSync('screenshot.png', buffer);The URLs returned in screenshotUrl / fullPageScreenshotUrl already encode the correct id and type, so you can fetch them directly — just remember to attach your X-API-Key header.