Screenshot API
Capture Website Screenshot renders a public web page in headless Chromium and returns the image as a base64 string inside a JSON response, so there is no browser to install, host or keep patched on your side. You send an absolute http or https URL and choose the viewport width and height, whether to capture only the viewport or the entire scrollable document with fullPage, and PNG for sharp, lossless text or JPEG with a quality setting for a much smaller file. Pages rarely settle the moment they load, so waitUntil lets you wait for the DOM, for every subresource, or for the network to go quiet on lazy-rendered apps, and delayMs adds a settle time for animations and late hydration. blockAds aborts requests to known ad and tracker hosts before they load, so they never appear in the image. The response carries the image, its format, its pixel width and height — the full document height when fullPage was set — the decoded size in bytes, and the finalUrl after any redirects, so a shortened or redirecting link tells you where it really landed. Addresses that resolve to private, loopback, link-local or cloud-metadata ranges are rejected, which keeps the operation from being pointed at internal infrastructure. Every call authenticates with your upAPI key in the X-Api-Key header. The exact price and cache lifetime are on this page’s FAQ, generated from the same catalog the calls run against.
What data you get
Capture Website Screenshot
- bytes
- integerrequired — Size of the DECODED image in bytes (the base64 string is ~4/3 of this).
- image
- stringrequired — Base64-encoded image bytes. No
data:URI prefix — decode directly. - width
- integerrequired — Image width in pixels.
- format
- enumrequired — Encoding of the returned image.
- height
- integerrequired — Image height in pixels — the full document height when fullPage was true.
- finalUrl
- stringrequired — URL of the page actually captured, after any redirects.
Calling Capture Website Screenshot
A schema-derived request and response shape — not a captured production call, since upAPI has none to publish. Every field is real, from the operation’s own published schema.
curl -X POST https://api.upapi.io/screenshot.post \
-H "X-Api-Key: $UPAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"width": 1280,
"format": "png",
"height": 800,
"delayMs": 0,
"blockAds": false,
"fullPage": false,
"waitUntil": "load"
}'{
"bytes": 1,
"image": "example",
"width": 1,
"format": "png",
"height": 1,
"finalUrl": "example"
}Pricing
Every unit draws from one pooled monthly quota shared across the whole catalog. What a unit costs on each plan is on the pricing page, linked below.
Questions people actually ask
How do I take a full-page screenshot with the API?
Set fullPage to true. The layout viewport still comes from width and height, but the image grows to the full height of the document, and the height field of the response reports the size you actually got.
Does the screenshot API return a file or a URL?
Neither — it returns the image as a base64 string in the image field of the JSON response, with no data: prefix, so you decode it directly and store it wherever you like. The format, width, height and decoded size in bytes come back beside it.
Can I screenshot a page behind a login or on a private network?
No. It captures public pages: the operation has no cookie or header inputs, and a URL that resolves to a private, loopback, link-local or cloud-metadata address is rejected.
Should I choose PNG or JPEG?
PNG is lossless and sharper for text and interface screenshots. JPEG is far smaller and accepts a quality setting; quality is rejected when the format is png, because a lossless image has nothing to tune.
How much does this cost?
Every operation in this cluster costs 20 weighted units per call, drawn from your plan’s pooled monthly quota — see upapi.io/pricing for what a unit costs on each tier.
How fresh is the data — is it cached?
every cached operation here returns a response held for 1 minute. A repeat call inside a cached window returns the cached response and is billed nothing.
Related
Start with the free plan
One key and one pooled monthly quota cover Capture Website Screenshot and every other API in the catalog. See what a unit costs on each plan, or run the operation first.