Page options
All the available page options for the PDF/screenshot API endpoints.
Either page.url
, page.html
or page.htmlTemplate
needs to be set, they cannot be used at the same time!
URL to go to. Should include the scheme, e.g. https://
HTML to render. Needs to be base64 encoded!
HTML template to render. Needs to be base64 encoded!
Template data, only used in combination with page.htmlTemplate
.
When to consider waiting succeeds.
auto
our smart waiting option that can handle 90% of the cases.load
waits for the 'load' event.domcontentloaded
waits for the 'DOMContentLoaded' event.networkidle0
waits till there are no more than 0 network connections for at least500
ms.networkidle2
waits till there are no more than 2 network connections for at least500
ms.
auto
, load
, domcontentloaded
, networkidle0
, networkidle2
Wait for a certain amount of milliseconds before the request continues.
0 < x < 5000
Wait for the pageFunction
to execute in the page. If the pageFunction
doesn't execute successfully after the timeout
milliseconds of waiting, the request will continue.
An object containing additional HTTP headers to be sent with every request. All header values must be strings.
Use our build-in adblocker.
Whether or not to enable JavaScript on the page.
Cookies added to the page, Also accepted as string inside headers.cookie
.
Provide credentials for HTTP authentication
.
Color-scheme to set on the page.
20
Changes the CSS media type of the page.
screen
, print
Changes the timezone of the page. See ICU’s metaZones.txt for a list of supported timezone IDs.
Was this page helpful?