Skip to content

All options ​

Every option you can send to /api/v1/shots and /api/v1/rendered-html. Only url or html is required.

The last column shows which endpoint uses the option: S for screenshots, P for PDFs, H for rendered HTML. Other endpoints ignore it.

Limits marked "free: …" apply to accounts without a plan and without credits. See Free plan.

Source ​

OptionTypeDefaultDescriptionUsed by
urlstringThe page to load. Must start with http:// or https:// and be reachable from the internet. Required without html.S P H
htmlstringHTML to render instead of a URL. Up to 2,000,000 characters. Required without url.S P H

If you send both, the html is rendered and url is ignored.

HTML can't reference file:// URLs, localhost, 127.0.0.1 or ::1. Images, stylesheets and fonts in your HTML must use absolute public URLs, or be inlined as data: URLs.

Output ​

OptionTypeDefaultDescriptionUsed by
file_typestringpngpng, jpg, webp or pdf.S P
qualityintegerImage quality from 1 to 100. Only with file_type jpg or webp. Lower values give smaller files.S

Viewport and area ​

OptionTypeDefaultDescriptionUsed by
window_widthinteger800Width of the browser window in pixels. 1 to 10,000, free: 1,920. Requires window_height unless full_page is set.S H
window_heightinteger600Height of the browser window in pixels. 1 to 10,000, free: 1,080. Requires window_width.S H
device_scale_factorinteger1Pixel density. 1 to 3, free: 1. A width of 1,280 with a factor of 2 gives an image 2,560 pixels wide.S
full_pagebooleanfalseCapture the whole scrollable page instead of the window. Not on the free plan.S
selectorstringCSS selector of one element to capture, for example #chart. Can't be combined with full_page.S
clip_xintegerLeft edge of the area to capture, in pixels.S
clip_yintegerTop edge of the area to capture, in pixels.S
clip_widthintegerWidth of the area to capture. Free: up to 1,920.S
clip_heightintegerHeight of the area to capture. Free: up to 1,080.S
hide_backgroundbooleanfalseLeave out the page background.S
transparent_backgroundbooleanfalseMake the default white background transparent. Use with png or webp.S

The final image can be at most 16,384 pixels wide or high, and at most 40 megapixels. Width and height are multiplied by device_scale_factor.

clip_x, clip_y, clip_width and clip_height must be sent together, and can't be combined with full_page.

PDF ​

OptionTypeDefaultDescriptionUsed by
paper_formatstringA0 to A6, Letter, Legal, Tabloid or Ledger. Required for PDFs unless you send paper_width and paper_height.P
paper_widthnumberPaper width in millimeters, 1 to 5,000. Requires paper_height.P
paper_heightnumberPaper height in millimeters, 1 to 5,000. Requires paper_width.P
paper_orientationstringportraitportrait or landscape.P
paper_margins_topnumberTop margin in millimeters, 0 to 250.P
paper_margins_rightnumberRight margin in millimeters, 0 to 250.P
paper_margins_bottomnumberBottom margin in millimeters, 0 to 250.P
paper_margins_leftnumberLeft margin in millimeters, 0 to 250.P
pdf_show_backgroundbooleantruePrint background colors and images.P
show_browser_header_and_footerbooleanfalsePrint a header and a footer on every page.P
header_htmlstringHTML for the header. Up to 100,000 characters. Needs show_browser_header_and_footer.P
footer_htmlstringHTML for the footer. Up to 100,000 characters. Needs show_browser_header_and_footer.P
initial_page_numberintegerThe number of the first page, for the pageNumber placeholder in headers and footers.P

Send all four paper_margins_* options together. See Headers and footers in PDFs for the header and footer placeholders.

Waiting for the page ​

By default, the capture starts once the page fired its load event.

OptionTypeDefaultDescriptionUsed by
delayinteger0Wait this many milliseconds after the page loaded. 0 to 30,000, free: 2,000.S P H
wait_for_selectorstringWait until an element matching this CSS selector exists. Fails with a timeout if it never appears.S P H
wait_until_network_idlebooleanfalseWait until the page has at most 2 open network connections for 500 ms. Works for pages that keep polling a server.S P H
wait_until_network_idle_strictbooleanfalseWait until the page has no open network connections for 500 ms.S P H
timeoutinteger10Give up after this many seconds. 0 to 60, free: 15.S P H

The timeout covers loading the page and all waiting. A delay of 8,000 ms with the default timeout of 10 seconds leaves 2 seconds to load the page. Raise timeout when you add waits.

Page behavior ​

OptionTypeDefaultDescriptionUsed by
css_media_typestringscreen or print. Without it, screenshots use screen styles and PDFs use print styles.S P H
color_schemestringlight or dark. Sets prefers-color-scheme for pages with a dark mode.S P H
browser_languagestringen-GBLanguage of the browser, for example de or fr-CH. Sites that pick the language from the browser use it.S P H
disable_javascriptbooleanfalseLoad the page without running JavaScript.S P H
disable_imagesbooleanfalseLoad the page without images.S P H
dismiss_dialogsbooleanfalseClose JavaScript alert, confirm and prompt dialogs. Doesn't close cookie banners.S P H
block_urlsarray of stringsDon't load resources whose URL contains one of these strings, for example ["analytics.js"]. Up to 50 entries.S P H
block_domainsarray of stringsDon't load resources from these domains, for example ["googletagmanager.com"]. Up to 50 entries.S P H
ignore_https_errorsbooleanfalseLoad pages with invalid or self-signed certificates.S P H
disable_web_securitybooleanfalseTurn off CORS checks in the browser.S P H

Logins and headers ​

OptionTypeDefaultDescriptionUsed by
http_headersarray of objectsExtra headers sent with every request of the page. Each object has a key and a value. Up to 50.S P H
cookiesarray of objectsCookies to set before the page loads. Each object has a key, a value and an optional domain. Up to 50.S P H
basic_authentication_usernamestringUsername for HTTP basic authentication. Requires the password.S P H
basic_authentication_passwordstringPassword for HTTP basic authentication. Requires the username.S P H

Arrays need a JSON body, or the http_headers[0][key]=... notation in form data:

json
{
    "url": "https://example.com/dashboard",
    "http_headers": [
        { "key": "X-Preview-Token", "value": "secret" }
    ],
    "cookies": [
        { "key": "session", "value": "abc123", "domain": "example.com" }
    ]
}

We don't store cookies or basic authentication credentials. Header values are stored with the request. See Which data of my requests is stored?

Request behavior ​

OptionTypeDefaultDescriptionUsed by
test_requestbooleanfalseValidate the request and return a placeholder without starting a browser. See Test requests.S P H
cachebooleantrueSet to false to render the page again instead of returning a stored result. Not on the free plan. See Caching.S P H
cache_ttlinteger86400How long to keep the result, in seconds. 60 to 86,400. Not on the free plan.S P H