Capture screenshot (returns image binary)
Accepts a JSON body with capture parameters. Returns the screenshot as a binary image with metadata in response headers (x-screenshot-*, x-rendex-*).
Request body
Webpage URL to capture (mutually exclusive with html and markdown)
Raw HTML to render (up to 5 MB, mutually exclusive with url and markdown)
Markdown to render as styled HTML, then capture (up to 5 MB, mutually exclusive with url and html)
Mustache template data object. When present, the html or markdown string is treated as a logic-less Mustache template and rendered against data before capture. Valid only with html or markdown — returns 400 if combined with url. Serialized size must not exceed 256 KB. Syntax: {{var}} (HTML-escaped), {{{var}}} (raw), {{#items}}…{{/items}} (loop), {{^x}}…{{/x}} (inverted section), {{a.b}} (nested access).
Output format
Viewport width in pixels
Viewport height in pixels
Capture full scrollable page (capped at 16384px height)
Image quality (JPEG and WebP only)
Wait milliseconds after page load before capture
Emulate dark color scheme
Device pixel ratio (2 for Retina)
Block ads, trackers, and chat widgets
Resource types to block during page load
CSS to inject into the page before capture
JavaScript to execute on the page before capture
Custom HTTP headers to send with the page request
Custom User-Agent string
Navigation timeout in seconds
Page readiness condition before capture
CSS selector to wait for before capture
Return partial screenshot on timeout instead of failing
CSS selector of element to capture instead of full page
Paper size for PDF output (only applies when format is pdf)
Use landscape orientation for PDF output
Include background colors and images in PDF output
Scale factor for PDF rendering (0.1 to 2)
ISO 3166-1 alpha-2 country code for geo-targeted rendering (Pro/Enterprise)
City for geo-targeted rendering (Pro/Enterprise)
State or region for geo-targeted rendering (Pro/Enterprise)
Process the capture asynchronously (returns a jobId to poll)
URL to receive a webhook notification when the capture completes
Cache time-to-live in seconds (1 hour to 30 days)
Device preset — sets viewport, device scale, and user agent in one parameter. Explicit width/height/userAgent still win.
CSS selectors to hide before capture (popups, sticky nav, chat bubbles). Never errors on a miss.
Hide common cookie/consent walls (OneTrust, Cookiebot, Quantcast, …) via a curated CSS list.
Store the result in R2 and return {url, expiresAt} (a signed CDN-backed URL) instead of the image bytes. Drop the URL into an <img>/og:image.
Also return clean reader-mode content from the same render pass (use on /v1/screenshot/json; the binary endpoint rejects it). Shape set by extractFormat.
Shape of the extracted content when extract is true.
Downscale the output to this width (image formats only). Aspect ratio preserved when only one dimension is set. Never upscales.
Downscale the output to this height (image formats only).
Response
Screenshot captured successfully