webstractor
Developer docs

Website screenshots

Capture a public page once. Reuse it for 30 days.

GET /v1/screenshot returns raw WebP or PNG image bytes for a public website. Identical captures share an aggressively cached result.

Basic request

curl --get 'https://api.webstractor.com/v1/screenshot' \
  --data-urlencode 'url=https://example.com/' \
  --output screenshot.webp

Parameters

ParameterRequiredDescription
urlYesAbsolute public HTTP or HTTPS URL, up to 2,048 characters.
widthNoViewport width from 320 to 1920; default 1440.
heightNoViewport height from 240 to 1080; default 900.
fullPageNofalse by default. Use true to capture up to 10,000 vertical pixels.
formatNowebp (default, quality 82) or lossless png.

Custom viewport and PNG

curl --get 'https://api.webstractor.com/v1/screenshot' \
  --data-urlencode 'url=https://example.com/' \
  --data-urlencode 'width=390' \
  --data-urlencode 'height=844' \
  --data-urlencode 'format=png' \
  --output screenshot.png

Full-page capture

curl --get 'https://api.webstractor.com/v1/screenshot' \
  --data-urlencode 'url=https://example.com/' \
  --data-urlencode 'width=1440' \
  --data-urlencode 'height=900' \
  --data-urlencode 'fullPage=true' \
  --output full-page.webp

The requested width and height establish the responsive viewport before capture. Full-page output keeps that width and extends vertically to the document height. Pages taller than 10,000 pixels and encoded images larger than 10 MB return 413.

Deterministic public state

Captures use a fixed light color scheme, English locale, screen styles, device scale factor 1, and a short bounded settling period. Animations and transitions are disabled before capture. The endpoint accepts no cookies, credentials, request headers, scripts, selectors, custom delays, geolocation, or authenticated sessions.

Caching and credits

Successful screenshots are cached for up to 30 days using the normalized URL, dimensions, full-page choice, format, and internal cache version. There is no caller-controlled refresh bypass. X-Webstractor-Cache: HIT responses are free; a successful MISS uses one anonymous allowance operation or account credit. Errors are not cached or charged.

The response is the image itself, not schema-versioned JSON. Errors retain the standard JSON error object. An ETag identifies the exact returned bytes.

Safety boundaries

Only ordinary public HTTP and HTTPS pages are accepted. Private networks, local hosts, direct IP targets, embedded credentials, non-standard ports, access controls, and security interstitials are rejected. Never place secrets or private information in the URL.