For AI agents: a documentation index is available at /llms.txt
Skip to main content

Connection URL Patterns

Every browser connection to Browserless (Puppeteer, Playwright, or BrowserQL) uses a WebSocket URL; the REST APIs use an HTTPS URL to the same regional hosts. Either way there's no account-specific URL to look up: you build the URL yourself from a regional endpoint, a path, and your API token, and any region works with any account. This page covers all valid WebSocket paths and explains when to use each one.

Prerequisites

Connection URL Builder

BaaS Connection URL Builder

Connection URL:

wss://production-sfo.browserless.io?token=YOUR_TOKEN

Code Snippet:

const browser = await puppeteer.connect({
  browserWSEndpoint: 'wss://production-sfo.browserless.io?token=YOUR_TOKEN',
});

Complete URL Anatomy

A full connection URL combines a regional endpoint, a path, your API token, and any launch options:

wss://production-sfo.browserless.io/chromium/playwright?token=TOKEN&blockAds=true
ComponentExample valueDescription
Protocolwss://WebSocket Secure, required for all connections
Regional endpointproduction-sfo.browserless.ioChoose the region closest to your target
Path/chromium/playwrightBrowser and protocol mode
Authtoken=TOKENYour API token
Launch optionsblockAds=trueQuery parameters that configure the browser

See Launch parameters for the full list of query parameters.

Connection Paths

All paths accept WebSocket connections. Paths are case-sensitive.

CDP

CDP is the default connection mode. Use it with Puppeteer, Playwright in CDP mode, or any library that speaks chrome-devtools-protocol. Connect to /chromium or /chrome; both work with the same client code. Choose CDP for the widest library compatibility.

PathBrowserNotes
/ChromiumDefault; equivalent to /chromium
/chromiumChromiumOpen-source Chromium build
/chromeChromeLicensed Google Chrome binary

Playwright Native

Playwright Native uses Playwright's own browser server protocol instead of CDP. Use it when you need Playwright-specific APIs: page.route() for network interception, APIRequestContext, or multi-browser support with Firefox and WebKit. Connect using playwright.connect({ wsEndpoint }) with a /chromium/playwright, /firefox/playwright, or /webkit/playwright path.

PathBrowserNotes
/chromium/playwrightChromiumPlaywright native protocol on Chromium
/chrome/playwrightChromePlaywright native protocol on Chrome
/firefox/playwrightFirefoxPlaywright native protocol on Firefox
/webkit/playwrightWebKitPlaywright native protocol on WebKit/Safari
/edge/playwrightEdgePlaywright native protocol on Microsoft Edge

For a feature comparison of connect vs connectOverCDP, see connect vs connectOverCDP.

Stealth

Stealth routes layer anti-detection hardening on top of the browser. Use stealth when the target site has bot detection. /stealth provides the strongest baseline with a purpose-hardened browser. /chromium/stealth and /chrome/stealth add anti-detection to your chosen browser binary. See Stealth Routes for guidance on choosing the right variant.

PathBrowserNotes
/stealthStealth browserPurpose-hardened binary; highest evasion baseline
/chromium/stealthChromiumChromium with anti-detection layer
/chrome/stealthChromeChrome with anti-detection layer

Any stealth route also accepts the emulationOs query parameter (windows, macos, or linux) to present a coherent OS fingerprint instead of the default Linux identity.

Chrome vs Chromium

/chrome and /chromium paths use different browser binaries but share the same feature set: CDP proxy, session replay, captcha solving, and proxy support all work on both. Chrome uses the licensed Google Chrome binary, which includes proprietary codec and DRM support. Chromium uses the open-source build, which does not. For most automation tasks, either works identically.

Regional Endpoints

Browserless runs in multiple regions. Use the endpoint closest to your target sites or your own infrastructure to reduce latency. All paths and protocol modes work identically across regions.

RegionEndpoint
US West (San Francisco)production-sfo.browserless.io
Europe (London)production-lon.browserless.io
Europe (Amsterdam)production-ams.browserless.io

FAQ & Troubleshooting

Where do I find my WebSocket URL, endpoint, or region?

There's nothing to find: the URL isn't account-specific, so it doesn't appear in the dashboard. Build it yourself by picking any regional endpoint and appending a path and your API token:

wss://production-sfo.browserless.io/chromium/playwright?token=YOUR_API_TOKEN_HERE

Your account has no assigned region; pick whichever is closest to you or your target sites. The only account-specific value is the token, which lives in your account dashboard. If a tool asks for a "base URL" or "host" without the wss:// protocol, use production-sfo.browserless.io (or your chosen region).

Why am I getting 401 Unauthorized: Invalid API key?

The token in your URL isn't valid: it's missing, mistyped, truncated, regenerated since you copied it, or from a different account. Copy the current token from your account dashboard and pass it as ?token= in the URL. If your client strips query parameters (some frameworks do), check the final URL it actually dials.

My tool or template uses wss://chrome.browserless.io and won't connect

That's the legacy v1 domain, and many older tutorials, n8n templates, and code generators still emit it. Replace it with a current regional endpoint, keeping your token:

# Old (v1, no longer works for v2 accounts)
wss://chrome.browserless.io?token=YOUR_API_TOKEN_HERE

# New
wss://production-sfo.browserless.io?token=YOUR_API_TOKEN_HERE

See the migration guide for the other v1-to-v2 changes.

Is there an Asia-Pacific region?

Not currently. The regions are San Francisco, London, and Amsterdam; measure latency from your own infrastructure against all three and pick the fastest. If what you actually need is requests exiting from a specific country (say, India), that's a proxy setting rather than a region: use the residential proxy with proxyCountry.

Why am I getting a 403 Forbidden error?

Your API token is missing or expired. Pass it as a ?token= query parameter in the WebSocket or HTTP URL. Verify the token in your account dashboard.

My script works locally but fails on Browserless

Local browser settings may differ from the Browserless environment. Use launch parameters to match your local setup (viewport, user agent, timezone). See launch parameters for the full list.

Next steps

Was this page helpful?