Capture Website Screenshot
TypeScriptToolsPOST api.upapi.io/screenshot.postRender 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.
Request schema
| Field | Type | Description |
|---|---|---|
urlreq | string | 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. |
width | integer | Viewport width in CSS pixels (e.g. 1280).· default: 1280 |
format | string | Image encoding: 'png' is lossless and sharper for text; 'jpeg' is far smaller and accepts quality (e.g. png).· default: "png" |
height | integer | 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).· default: 800 |
delayMs | integer | Extra settle time after navigation before the shot, in milliseconds — for animations or late hydration (e.g. 500).· default: 0 |
quality | integer | JPEG encoder quality, 1-100 (default 80). Rejected when format is png, which is lossless (e.g. 80). |
blockAds | boolean | Abort requests to known ad and tracker hosts before they load, so they cannot appear in the image (e.g. true).· default: false |
fullPage | boolean | Capture the entire scrollable document instead of just the viewport (e.g. false).· default: false |
waitUntil | string | 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).· default: "load" |
Response schema
| Field | Type | Description |
|---|---|---|
bytesreq | integer | Size of the DECODED image in bytes (the base64 string is ~4/3 of this). |
imagereq | string | Base64-encoded image bytes. No data: URI prefix — decode directly. |
widthreq | integer | Image width in pixels. |
formatreq | string | Encoding of the returned image. |
heightreq | integer | Image height in pixels — the full document height when fullPage was true. |
finalUrlreq | string | URL 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.
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" }'