# Screenshot API: Capture Any URL as PNG or JPEG

> Screenshot API: capture any public URL as a PNG or JPEG in headless Chromium — full page, custom viewport, ad blocking — as JSON behind one upAPI key.

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.

## Operations

- [Capture Website Screenshot](https://upapi.io/apis/tools/screenshot) (20 units): Render any public web page in headless Chromium and return a PNG or JPEG screenshot as base64 (or, with output: url, a signed link) — viewport or full page, with a configurable viewport size, wait strategy and settle delay.

## Frequently asked questions

### 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.

Last updated 2026-10-20.
