Capture any URL or HTML string as PNG / JPEG / WebP, at any device size.
screenshot
renderbrowser
Boots a headless browser: ~2–5s.
Full-page or viewport captures with device emulation, element clipping and colour-scheme control.
Handy for social preview images, visual regression baselines, and giving a vision model something to look at.
Blocking image/font/media resources can cut capture time roughly in half when you only care about layout.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | — | Page to capture. |
| html | string | — | HTML to render instead of navigating to a URL. |
| device | `desktop` | `laptop` | `tablet` | `iphone` | `android` | `custom` | "desktop" |
Viewport preset. Use custom together with width/height. |
| width | integer | 1440 |
Viewport width (custom device). |
| height | integer | 900 |
Viewport height (custom device). |
| deviceScaleFactor | number | 1 |
Pixel density (2 = retina). |
| fullPage | boolean | false |
Capture the entire scrollable page. |
| selector | string | — | Capture only the first element matching this CSS selector. |
| type | `png` | `jpeg` | `webp` | "png" |
Image encoding. |
| quality | integer | 85 |
Compression quality for jpeg/webp. |
| omitBackground | boolean | false |
Transparent background (PNG/WebP only). |
| colorScheme | `light` | `dark` | `no-preference` | "light" |
Emulate the OS colour scheme. |
| blockResources | string[] | [] |
Resource types to block, for faster captures. |
| delayMs | integer | 0 |
Extra wait after load, for animations to settle. |
| waitUntil | `load` | `domcontentloaded` | `networkidle0` | `networkidle2` | "networkidle2" |
When to consider navigation finished. |
| waitForSelector | string | — | Block until this CSS selector appears. Useful for lazily hydrated SPAs. |
| timeoutMs | integer | 20000 |
Hard timeout for the page load, in milliseconds. |
| filename | string | "screenshot.png" |
Download filename. |
Image bytes, or `{mime, filename, bytes, base64}` when JSON output is requested.