Skip to main content

Endpoint

The POST method accepts parameters in the request body. The GET method accepts all parameters as query strings and always returns a binary image.

Headers

Request body (POST)

url
string
required
The URL of the webpage to capture. Must be a valid URL.
name
string
Optional name for the screenshot (max 100 characters).

Capture options

Pass these inside the options object in the request body.
options.format
string
default:"png"
Output format. Options: png, jpeg, webp, pdf.
options.viewport_width
integer
default:"1280"
Viewport width in pixels (100–5000).
options.viewport_height
integer
default:"1024"
Viewport height in pixels (100–5000).
options.full_page
boolean
default:"false"
Capture the full scrollable page instead of just the viewport.
options.image_quality
integer
default:"80"
Image quality for JPEG, WebP, and PDF (0–100). Ignored for PNG.
options.device_scale_factor
number
default:"1"
Device pixel ratio (1–3). Use 2 for retina-quality screenshots.
options.viewport_mobile
boolean
default:"false"
Emulate a mobile device viewport.
options.viewport_has_touch
boolean
default:"false"
Enable touch event support.
options.viewport_landscape
boolean
default:"false"
Use landscape orientation.
options.block_ads
boolean
default:"false"
Block advertisements on the page.
Block cookie consent banners.
options.block_chats
boolean
default:"false"
Block chat widgets (e.g., Intercom, Drift).
options.selector
string
CSS selector of a specific element to capture instead of the full page (max 255 characters).
options.selector_scroll_into_view
boolean
default:"true"
Automatically scroll the selected element into view before capturing.
options.error_on_selector_not_found
boolean
default:"false"
Return an error if the specified selector is not found on the page.
options.wait_for_selector
string
CSS selector to wait for before capturing (max 255 characters). The capture starts once this element exists in the DOM.
options.delay
integer
default:"0"
Milliseconds to wait after page load before capturing (0–10000).
options.timeout
integer
default:"60000"
Maximum time in milliseconds to wait for the page and screenshot process (1000–90000).
options.navigation_timeout
integer
default:"30000"
Maximum time in milliseconds to wait for page navigation (1000–30000).
options.wait_until
string
default:"load"
When to consider navigation complete. Options: load, domcontentloaded, networkidle0, networkidle2. Can also be an array of values.
options.response_type
string
default:"by_format"
Controls the response format. Options: by_format, json, empty.
options.dark_mode
boolean
Emulate dark color scheme (prefers-color-scheme: dark).
options.omit_background
boolean
default:"false"
Remove the default white background for transparent captures (PNG and WebP only).
options.full_page_scroll
boolean
Scroll through the page before capturing. Useful for triggering lazy-loaded content.
options.full_page_scroll_delay
integer
default:"400"
Milliseconds to wait between scroll steps (0–5000).
options.full_page_scroll_by
integer
Number of pixels to scroll per step (0–5000).
options.full_page_max_height
integer
Maximum height in pixels for full-page captures (0–50000).

Response

The response format depends on the response_type option.

response_type: "by_format" (default)

Returns the screenshot as binary data with the appropriate Content-Type header (e.g., image/png, image/jpeg, application/pdf). For POST requests, a Content-Disposition: attachment header is also included.

response_type: "json"

Returns 201 Created with a JSON response:

response_type: "empty"

Returns 200 OK with an empty body. Useful for fire-and-forget captures.

Error responses

See error codes for the full error response format.

Examples

Basic capture (binary response)

GET request (binary response)

Full-page JPEG with custom viewport (JSON response)

Mobile device with dark mode

Capture specific element with ad blocking