Options
Everything a screenshot can be asked for, with its range and default.
The options
| Option | Description |
|---|---|
urlrequired | The page, http or https, up to 2,048 characters. |
viewport_widthoptional | The browser window's width, 320 to 3,840. Default |
viewport_heightoptional | The browser window's height, 200 to 4,320. Default |
device_scale_factoroptional |
|
full_pageoptional |
|
formatoptional |
|
qualityoptional | 1 to 100, for |
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 |
delayoptional | Seconds to wait after the page has loaded, 0 to 10. Default 0. |
wait_untiloptional | When the page counts as loaded: |
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 |
block_adsoptional | Blocks ads and trackers. Default |
dark_modeoptional | Asks the page for its dark theme ( |
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 |
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 |
freshoptional |
|
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.