Skip to main content

Launch Parameters and Options

Browserless allows extensive configuration of how browsers are launched and behave during your sessions. These launch parameters can be provided either via query parameters in the URL or through a special JSON launch payload. Whether you're using BQL, BaaS v2, or REST, these options let you tweak the browser environment to fit your needs.

Passing Launch Options

Two ways to specify launch options:

  1. Individual Query Parameters: Add options directly to URLs (e.g., &headless=false, &proxy=residential). Best for simple boolean options.

  2. Combined launch Parameter (JSON): For complex configurations, use a single query param launch with a JSON string as its value. This JSON can include any Chrome flags or Browserless-specific settings in a structured way. It's essentially the equivalent of Puppeteer's launch({ options }) but provided to the cloud service:

    &launch={"headless":false,"stealth":true,"args":["--window-size=1920,1080"]}

    (URL-encoded) would configure a headful, stealth-enabled browser with a specific window size.

Browserless merges both methods if used together, with individual parameters taking precedence. Use query params for simple toggles and the launch parameter for multiple settings.

Launch Options (Query Parameters)

Below is a list of available launch options you can use in query strings for Browserless REST APIs.

ParameterDescriptionDefault
headlessRuns the browser in headless mode. Set to false to enable headful mode (with a GUI). While the GUI isn't visible in cloud environments, headful mode may help bypass bot detection. Note: it uses more resources.true
stealthEnables stealth mode to reduce automation signals (similar to puppeteer-extra’s stealth plugin). In REST, set to true to enable stealth techniques.false
blockAdsEnables the built-in ad blocker (powered by uBlock Origin). Helps speed up scripts and reduce noise by blocking ads and trackers. Especially useful for scraping to avoid popups and clutter.false
blockConsentModalsAutomatically blocks or dismisses cookie/GDPR consent banners. Useful for cleaner scraping by removing overlays.false
proxyRoutes browser traffic through a proxy. Options:
• proxy=residential: Use Browserless’s residential proxy pool (premium feature with real ISP IPs; use with proxyCountry for geolocation).
• proxy=<your proxy URL>: Provide your own proxy (e.g., http://user:pass@host:port). URL-encode if it includes special characters.
• Omit to use a direct connection (no proxy).
none
proxyCountryUsed with proxy=residential to specify the exit node’s country. Accepts ISO 3166 country codes (e.g., us, gb, de). If omitted, a random location is chosen.none
proxyStickyUsed with proxy=residential to maintain the same proxy IP across a session (when possible). Useful for sites that expect consistent IP usage.false
timeoutMaximum session duration in milliseconds. The session will automatically close after this time to prevent overuse.60000
info

The examples below use the /pdf API, but it can be applied to all APIs.

Headless

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&headless=true \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Stealth

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&stealth=true \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Blocking Ads

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&blockAds=true \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Under the hood, Browserless uses UBlock Origin to block ads and filter content.

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&blockConsentModals=true \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Proxy

Using http://user:pass@host:port as an example proxy URL:

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&proxy=http://user:pass@host:port \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Proxy Country

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&proxy=residential&proxyCountry=us \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Proxy Sticky

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&proxy=residential&proxySticky=true \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'

Timeout

  curl -X POST \
https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&timeout=25000 \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/"
}'