Docs menu
API v3

Options

Everything a screenshot can be asked for, with its range and default.

The options

OptionDescription
urlrequired

The page, http or https, up to 2,048 characters. https:// is added when there is no scheme.

viewport_widthoptional

The browser window's width, 320 to 3,840. Default 1280.

viewport_heightoptional

The browser window's height, 200 to 4,320. Default 1024.

device_scale_factoroptional

1, 2 or 3: pixels per CSS pixel, for sharp images on high-density screens. Default 1.

full_pageoptional

true for the whole page, not just the window. The page is scrolled first, so images that load on scroll are in. Cut at 16,383 pixels of image. Default false.

formatoptional

jpeg, png or webp. Default jpeg.

qualityoptional

1 to 100, for jpeg and webp. Default 80.

widthoptional

The image resized to this width, 16 to 3,840: a thumbnail. Alone, it keeps the capture's proportions.

heightoptional

The image resized to this height, 16 to 16,383. With width, the window takes their proportions (its height worked out from its width), so the image is exactly that box. With full_page, the page is cut at this height.

delayoptional

Seconds to wait after the page has loaded, 0 to 10. Default 0.

wait_untiloptional

When the page counts as loaded: load, domcontentloaded, networkidle0 (no requests for half a second) or networkidle2 (at most two). Default networkidle2. If it isn't reached, the page is captured anyway.

wait_for_selectoroptional

A CSS selector to wait for before the capture, up to 255 characters. If it doesn't appear in 30 seconds, the render fails as a timeout.

block_cookie_bannersoptional

Answers the page's cookie banner as a visitor would, rejecting, so the capture has no banner. Default true.

block_adsoptional

Blocks ads and trackers. Default false.

dark_modeoptional

Asks the page for its dark theme (prefers-color-scheme: dark). Default false.

user_agentoptional

The browser's User-Agent, up to 512 printable characters. PagePeeker's robot signature is added at its end.

accept_languageoptional

The languages the browser asks for, as en-US,en;q=0.9, up to 100 characters. Sites that go by the visitor's address may still answer in German: the robot renders from Germany.

cache_ttloptional

How old a cached render may be to be answered, in seconds, 3,600 to 2,592,000 (an hour to 30 days). Default 86400, a day.

freshoptional

true renders the page again, whatever the cache holds. Default false.

waitoptional

Seconds to hold the request open for the render, 0 to 60. Default 0. Not in signed links.

Values

In a JSON body, booleans are true and false, numbers are JSON numbers. In a signed link, booleans are true, false, 1 or 0, and numbers are digits. Numbers are whole numbers.

An option the API doesn't know is refused (400 unknown_option), as is a wrong value (400 invalid_option, every one named in fields with what it takes).

Thumbnails

A thumbnail of the top of a page is width and height together: {"url": "https://example.com/", "width": 480, "height": 360} renders a 1280 x 960 window and gives a 480 x 360 image.