# Parameters

> Every Shotfly screenshot API parameter: output format, full page, viewport and devices, waiting, blocking, caching and more.

Use them as query parameters with `GET /v1/screenshot` or as a JSON body with `POST /v1/screenshot`. Unknown parameters are rejected so typos do not go unnoticed. Machine-readable reference: [openapi.json](https://api.shotfly.dev/openapi.json).

## Source

| Parameter | Description |
| --- | --- |
| `url` | Page to capture. http(s) only; a missing scheme defaults to https. |
| `html` | Raw HTML to render instead of a URL (POST only, up to 2 MB). |

## Output

| Parameter | Description |
| --- | --- |
| `format` | png (default), jpeg, webp or pdf. A webp image is at most 16383 pixels on each side; taller captures are cut at the bottom. |
| `quality` | Quality 1–100 for jpeg and webp. Default 80. |
| `full_page` | Capture the whole scrollable page. Lazy content is scrolled into view first. |
| `full_page_max_height` | Height cap in CSS pixels for full_page (default 10000, max 20000). For webp it is lowered to 16383 ÷ device_scale_factor, rounded down (5461 for iphone_15). |
| `selector` | Capture only the first element matching this CSS selector. |
| `clip_x` | Clip rectangle left edge in CSS pixels (all four clip_* are required together). |
| `clip_y` | Clip rectangle top edge in CSS pixels. |
| `clip_width` | Clip rectangle width in CSS pixels. |
| `clip_height` | Clip rectangle height in CSS pixels. |
| `thumbnail_width` | Resize the result to this width, keeping the aspect ratio. |

## Viewport and device

| Parameter | Description |
| --- | --- |
| `device` | Device preset: desktop, desktop_hd, iphone_15, pixel_8, ipad. |
| `viewport_width` | Viewport width in CSS pixels (100–3840). Default 1280. |
| `viewport_height` | Viewport height in CSS pixels (100–2160). Default 800. |
| `device_scale_factor` | Pixel density 1–3. Default 1 (device presets set their own). |
| `dark_mode` | Emulate prefers-color-scheme: dark. |

## Waiting

| Parameter | Description |
| --- | --- |
| `wait_until` | load (default), domcontentloaded or networkidle. |
| `wait_for_selector` | Wait until this CSS selector is visible before capturing. |
| `delay` | Extra wait in milliseconds before capturing (max 10000). |
| `timeout` | Total time budget in seconds (5–60). Default 30. |

## Blocking

| Parameter | Description |
| --- | --- |
| `block_ads` | Block ads and trackers. Default true. |
| `block_cookie_banners` | Reject or hide cookie consent banners. Default true. Never clicks "accept". |
| `hide_selectors` | Comma-separated CSS selectors to hide before capturing. |

## Customise the page

| Parameter | Description |
| --- | --- |
| `css` | CSS injected into the page. |
| `js` | JavaScript evaluated in the page after load. |

## Request

| Parameter | Description |
| --- | --- |
| `user_agent` | Override the User-Agent header. |
| `headers` | Extra request headers as a JSON object. |
| `cookies` | Cookies as a JSON array of {name, value, domain?, path?}. |

## Hard sites and credits

| Parameter | Description |
| --- | --- |
| `geo` | Exit country (ISO 3166-1 alpha-2). Adds 2 credits. |
| `stealth` | Start with the stealth tiers, and allow the premium anti-bot tier. |
| `escalation` | none (default) or auto: allow the premium anti-bot tier when cheaper tiers hit a challenge. |
| `max_credits` | Never spend more than this many credits on the request. |

## Caching and delivery

| Parameter | Description |
| --- | --- |
| `cache_ttl` | Seconds a result may be served from cache (0 disables). Default 86400; at most 2592000 (30 days), and never longer than our current storage retention for cached screenshots. |
| `fresh` | Ignore any cached result and render again. |
| `markdown` | Also return the page content as Markdown (JSON responses and async jobs only). |
| `webhook_url` | Async jobs only (POST /v1/jobs): URL that receives the signed result. |
| `response_type` | image (default) returns the file; json returns metadata and a temporary link. |

---

Source: https://shotfly.dev/docs/parameters · Last updated 2026-11-27
