Skip to main content

Navigation Options

Rest API (Without Stealth)

You can use the gotoOptions to modify the default navigation behavior for the requested URL. The objects mirror Puppeteer's GoToOptions interface.

Bot detection

Browserless recommends using our REST API to take screenshots, unless you need to get past bot detectors.

curl -X POST \
https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN_HERE \
-H 'Cache-Control: no-cache' \
-H 'Content-Type': 'application/json' \
-d '{
"url": "https://example.com/",
"gotoOptions": { "waitUntil": "networkidle2" }
}' \
--output "screenshot.png"

BQL (Stealth)

If the /screenshot API is getting blocked by bot detectors, then we would recommend trying BrowserQL.

mutation Screenshot {
goto(url: "https://browserless.io/" waitUntil: networkIdle) {
status
}

screenshot(type: webp) {
base64
}
}
BQL Schemas

For more details on BQL mutations, refer to the BrowserQL Schema reference pages.