Capture Website Screenshot

TypeScriptTools
POST api.upapi.io/screenshot.post

Render any public web page in headless Chromium and return a PNG or JPEG screenshot as base64 — viewport or full page, with a configurable viewport size, wait strategy and settle delay.

screenshotbrowserrenderimagecapturethumbnail
AuthAPI key
Cost20 units
Timeout25s
Cache60s

Request schema

FieldTypeDescription
urlreq
stringAbsolute http(s) URL of the page to capture (e.g. https://example.com). URLs resolving to private, loopback, link-local or cloud-metadata addresses are rejected.
width
integerViewport width in CSS pixels (e.g. 1280).· default: 1280
format
stringImage encoding: 'png' is lossless and sharper for text; 'jpeg' is far smaller and accepts quality (e.g. png).· default: "png"
height
integerViewport height in CSS pixels. Still sets the layout viewport when fullPage is true, but the image then grows to the document height (e.g. 800).· default: 800
delayMs
integerExtra settle time after navigation before the shot, in milliseconds — for animations or late hydration (e.g. 500).· default: 0
quality
integerJPEG encoder quality, 1-100 (default 80). Rejected when format is png, which is lossless (e.g. 80).
blockAds
booleanAbort requests to known ad and tracker hosts before they load, so they cannot appear in the image (e.g. true).· default: false
fullPage
booleanCapture the entire scrollable document instead of just the viewport (e.g. false).· default: false
waitUntil
stringWhen navigation counts as done: 'domcontentloaded' is fastest, 'load' waits for subresources, 'networkidle' waits for the network to go quiet and suits lazy-rendered apps (e.g. load).· default: "load"

Response schema

FieldTypeDescription
bytesreq
integerSize of the DECODED image in bytes (the base64 string is ~4/3 of this).
imagereq
stringBase64-encoded image bytes. No data: URI prefix — decode directly.
widthreq
integerImage width in pixels.
formatreq
stringEncoding of the returned image.
heightreq
integerImage height in pixels — the full document height when fullPage was true.
finalUrlreq
stringURL of the page actually captured, after any redirects.

Try it

Try it

Absolute http(s) URL of the page to capture (e.g. https://example.com). URLs resolving to private, loopback, link-local or cloud-metadata addresses are rejected.

Viewport width in CSS pixels (e.g. 1280).

Image encoding: 'png' is lossless and sharper for text; 'jpeg' is far smaller and accepts quality (e.g. png).

Viewport height in CSS pixels. Still sets the layout viewport when fullPage is true, but the image then grows to the document height (e.g. 800).

Extra settle time after navigation before the shot, in milliseconds — for animations or late hydration (e.g. 500).

JPEG encoder quality, 1-100 (default 80). Rejected when format is png, which is lossless (e.g. 80).

Abort requests to known ad and tracker hosts before they load, so they cannot appear in the image (e.g. true).

Capture the entire scrollable document instead of just the viewport (e.g. false).

When navigation counts as done: 'domcontentloaded' is fastest, 'load' waits for subresources, 'networkidle' waits for the network to go quiet and suits lazy-rendered apps (e.g. load).

Run this endpoint live

Jump in as a guest — no signup — and run screenshot.post with your own inputs. Create a free account anytime to get your own API key.

Sign in

Code examples

curl -X POST https://api.upapi.io/screenshot.post \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "url": "https://example.com", "width": 1280, "format": "png", "height": 800, "delayMs": 0, "blockAds": false, "fullPage": false, "waitUntil": "load" }'

Developer tools

OpenAPI specImport the spec or collection into Postman, Insomnia, or any codegen tool.