GET Download Screenshot

Download a viewport or full-page screenshot captured during a scrape

GEThttps://api.anakin.io/v1/url-scraper/{id}/screenshot

Download 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

  1. Submit a scrape with a screenshot format — this auto-enables the headless browser:
    { "url": "https://example.com", "formats": ["screenshot", "screenshotFullPage"] }
  2. Poll the job until status is completed. The result includes screenshotUrl (viewport) and fullPageScreenshotUrl (full page).
  3. GET that URL with your X-API-Key header to download the PNG.

Path Parameters

ParameterTypeDescription
id requiredstringThe job ID whose screenshot you want. For batch jobs, use the per-result child job ID from the batch response.

Query Parameters

ParameterTypeDescription
type optionalstringviewport (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 OK

Raw PNG image bytes.

HeaderValue
Content-Typeimage/png
Cache-Controlprivate, max-age=300
StatusMeaning
200Screenshot streamed as image/png.
400Missing id, or type is not viewport/fullpage.
401Missing or invalid API key.
403The job exists but is not owned by your API key.
404Job 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.png

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.