Shotfly

API reference

Parameters

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.

Source

2 parameters
urlPage to capture. http(s) only; a missing scheme defaults to https.
htmlRaw HTML to render instead of a URL (POST only, up to 2 MB).

Output

10 parameters
formatpng (default), jpeg, webp or pdf. A webp image is at most 16383 pixels on each side; taller captures are cut at the bottom.
qualityQuality 1–100 for jpeg and webp. Default 80.
full_pageCapture the whole scrollable page. Lazy content is scrolled into view first.
full_page_max_heightHeight 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).
selectorCapture only the first element matching this CSS selector.
clip_xClip rectangle left edge in CSS pixels (all four clip_* are required together).
clip_yClip rectangle top edge in CSS pixels.
clip_widthClip rectangle width in CSS pixels.
clip_heightClip rectangle height in CSS pixels.
thumbnail_widthResize the result to this width, keeping the aspect ratio.

Viewport and device

5 parameters
deviceDevice preset: desktop, desktop_hd, iphone_15, pixel_8, ipad.
viewport_widthViewport width in CSS pixels (100–3840). Default 1280.
viewport_heightViewport height in CSS pixels (100–2160). Default 800.
device_scale_factorPixel density 1–3. Default 1 (device presets set their own).
dark_modeEmulate prefers-color-scheme: dark.

Waiting

4 parameters
wait_untilload (default), domcontentloaded or networkidle.
wait_for_selectorWait until this CSS selector is visible before capturing.
delayExtra wait in milliseconds before capturing (max 10000).
timeoutTotal time budget in seconds (5–60). Default 30.

Blocking

3 parameters
block_adsBlock ads and trackers. Default true.
hide_selectorsComma-separated CSS selectors to hide before capturing.

Customise the page

2 parameters
cssCSS injected into the page.
jsJavaScript evaluated in the page after load.

Request

3 parameters
user_agentOverride the User-Agent header.
headersExtra request headers as a JSON object.
cookiesCookies as a JSON array of {name, value, domain?, path?}.

Hard sites and credits

4 parameters
geoExit country (ISO 3166-1 alpha-2). Adds 2 credits.
stealthStart with the stealth tiers, and allow the premium anti-bot tier.
escalationnone (default) or auto: allow the premium anti-bot tier when cheaper tiers hit a challenge.
max_creditsNever spend more than this many credits on the request.

Caching and delivery

5 parameters
cache_ttlSeconds 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.
freshIgnore any cached result and render again.
markdownAlso return the page content as Markdown (JSON responses and async jobs only).
webhook_urlAsync jobs only (POST /v1/jobs): URL that receives the signed result.
response_typeimage (default) returns the file; json returns metadata and a temporary link.

Last updated 2026-11-27. Markdown version: /docs/parameters.md