Skip to main content

Confirm

Are you sure?

Changelog · September 24, 2026

screenshot_options: viewport, format, element, dark mode

The options every screenshot API has, in one object, at a flat price.

By · Last updated: September 2026

TL;DR

/screenshot and /scrape now take a screenshot_options object: PNG, JPEG or WebP with quality, viewport from 320 to 1920 wide, 1–3x scale, one element by CSS selector, dark mode, a transparent background, hidden selectors and injected CSS. Every combination costs the same one credit.

Free plan, no credit card. 1,000 credits a month.

Options sit under screenshot_options so each can be named for what it does, and a key the object doesn't know is refused with invalid_options rather than ignored. Every message names the field it is about.

A screenshot costs 1 credit whichever options you use. A request that spells out the defaults is the request with no options and is served its stored result.

Request

Example

A mobile WebP in dark mode
curl -X POST https://urlpipe.dev/screenshot \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "sync": true, "screenshot_options": {"format": "webp", "quality": 80, "viewport_width": 390, "device_scale_factor": 2, "dark_mode": true}}'

Four options change how the page loads — the viewport's width and height, the scale factor and dark mode — so in a /scrape a screenshot with any of them takes its own page load, and the HTML and Markdown beside it stay the page as it normally renders. A screenshot that can't be taken as asked (a selector that matched nothing, an image too large) fails on its own; the rest of the scrape still answers, and the failure is not billed.

FAQ

Frequently asked questions

Do screenshot options cost extra?
No. A screenshot is 1 credit whichever options it uses.
Which formats are supported?
PNG, JPEG and WebP, with a quality setting for the lossy two.
Can I capture one element instead of the page?
Yes. Pass a CSS selector as screenshot_options.selector and the image is that element.

Try it on the free plan.

Free plan, no card. Confirm your email and your API key is live — you'll be making real requests in minutes.