Managed Browsers
The platform runs a pool of real browsers for you. Your code connects to one over a WebSocket and drives it with Playwright — you never launch or install a browser yourself, and you never manage proxy credentials. Every browser always goes out through the proxy you choose.
For each granted engine the platform injects a ready-to-use WebSocket URL into your job’s environment, with the access token already embedded:
BROWSER_WS_URL_PLAYWRIGHTBROWSER_WS_URL_NODRIVERBROWSER_WS_URL_CAMOUFOXBROWSER_WS_URL_INSIGHTBROWSER
Read the URL from the environment and connect — that’s the whole setup.
You never set a proxy in the browser, and you never pass credentials. You only
state your intent with the proxy and country query parameters (below); the
service owns the rest.
Browser engines
| Engine | Driver call | What it is | Reach for it when |
|---|---|---|---|
| playwright | chromium.connect() | Managed Chromium over the Playwright protocol. | Default choice — fast, full Playwright API, JS rendering. |
| nodriver | chromium.connect_over_cdp() | Stealth Chrome (real display via Xvfb, software GL) driven over CDP. | Targets with bot detection that flag headless Chromium. |
| camoufox | firefox.connect() | Anti-fingerprint Firefox build with a spoofed device profile. | Aggressive fingerprinting defenses where Chromium gets caught. |
| insightbrowser | chromium.connect_over_cdp() | Anti-captcha stealth Chromium with source-level fingerprint patches (canvas/WebGL/audio/WebRTC). | Captcha walls — passes Cloudflare Turnstile & reCAPTCHA v3 without solving. |
Connecting to a browser
The only thing that changes between engines is which environment variable you read and which driver call you use.
playwright — Chromium
Use connect() with the Chromium driver:
from playwright.sync_api import sync_playwright
import os
# The platform injects a ready-to-use WebSocket URL (token already embedded)
# into your job's environment. Read it — never hard-code a URL or a token.
ws = os.environ["BROWSER_WS_URL_PLAYWRIGHT"]
with sync_playwright() as p:
browser = p.chromium.connect(ws)
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
browser.close()nodriver — Stealth Chrome
Stealth Chrome is driven over CDP — use connect_over_cdp(), not connect():
from playwright.sync_api import sync_playwright
import os
ws = os.environ["BROWSER_WS_URL_NODRIVER"]
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(ws)
page = browser.new_page()
page.goto("https://example.com")
browser.close()camoufox — Firefox
Camoufox is a Firefox build — connect with the firefox driver:
from playwright.sync_api import sync_playwright
import os
ws = os.environ["BROWSER_WS_URL_CAMOUFOX"]
with sync_playwright() as p:
browser = p.firefox.connect(ws)
page = browser.new_page()
page.goto("https://example.com")
browser.close()insightbrowser — Anti-captcha Chromium
InsightBrowser is a stealth Chromium driven over CDP — use connect_over_cdp()
(like nodriver), not connect(). Use it on targets gated by Cloudflare
Turnstile or reCAPTCHA v3: the source-level fingerprint patches clear those
challenges without a solver, so pages render straight through.
from playwright.sync_api import sync_playwright
import os
ws = os.environ["BROWSER_WS_URL_INSIGHTBROWSER"]
with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(ws)
page = browser.new_page()
page.goto("https://example.com") # a Turnstile-gated page renders through
print(page.title())
browser.close()Choosing the proxy
You select the egress proxy with two optional query parameters on the WebSocket URL. The service owns the credentials — you only state your intent:
| Parameter | Values | Default |
|---|---|---|
proxy | datacenter, residential | datacenter |
country | ISO 3166-1 alpha-2 code, e.g. us, mx, cl, de | us |
country takes any of the ~200 codes listed under
Geo-targeting, and only affects the residential
tier. An unavailable code is rejected when the session is created, with a 400
naming the code — the connection never opens, so you get a readable error
instead of a navigation that fails later with
net::ERR_TUNNEL_CONNECTION_FAILED.
A small helper keeps it tidy. The injected URL already contains the token, so
always append with &:
import os
def browser_url(engine: str, *, proxy: str = "datacenter", country: str | None = None) -> str:
"""Append the egress selection to the platform-injected WS URL.
engine : "playwright" | "nodriver" | "camoufox"
proxy : "datacenter" (default) or "residential"
country : optional 2-letter code, e.g. "us", "mx", "br"
"""
base = os.environ[f"BROWSER_WS_URL_{engine.upper()}"]
url = f"{base}&proxy={proxy}"
if country:
url += f"&country={country}"
return url
# Residential egress from Mexico:
ws = browser_url("nodriver", proxy="residential", country="mx")If you send nothing, you get a datacenter proxy. The choice is per connection, so two browsers in the same job can use different tiers or countries.
Billing
A browser session is billed by time and traffic, and the final amount is settled when the session ends. The charge has two parts:
- Time — per minute the session is open, at the rate of the browser
engine you chose (
playwright,nodriver,camoufox,insightbrowser). - Traffic — the data the session transfers in both directions (GB), at the
rate of the proxy tier you chose with
proxy=(datacenterorresidential).
Every session has a per-session minimum, so very short sessions are billed that minimum rather than a fraction of it. Traffic the browser sends through a proxy tier is part of the session charge and is never billed a second time as separate proxy usage.
In your dashboard analytics, sessions and browser-minutes appear under the engine, and session traffic appears as Browser bandwidth for the proxy tier it used, so you can split usage by engine and by tier. Organizations on an unlimited plan see these quantities without any prices.
Full example
from playwright.sync_api import sync_playwright
import os
def browser_url(engine, *, proxy="datacenter", country=None):
base = os.environ[f"BROWSER_WS_URL_{engine.upper()}"]
url = f"{base}&proxy={proxy}"
if country:
url += f"&country={country}"
return url
with sync_playwright() as p:
# Stealth Chrome, residential IP in the US — chosen entirely by the URL.
browser = p.chromium.connect_over_cdp(
browser_url("nodriver", proxy="residential", country="us")
)
page = browser.new_page()
page.goto("https://ipinfo.io/json")
print(page.inner_text("body")) # the egress IP — a proxy IP, never the host's
browser.close()Rules
Never send proxy credentials. Do not set a proxy in the browser
launch/context options, and do not send any X-Insight-Proxy-* header — the
service rejects credential headers with 400. Pick a tier with ?proxy=
instead.
- Always proxied. Every browser goes out through the proxy you choose, including background requests.
- Metered separately. Browser proxy traffic shows up in Analytics as
browser_datacenter/browser_residential, distinct from raw proxy usage. - On-demand. Browsers start when you connect. The first connection waits a few seconds for cold start; close the browser when you’re done so the slot frees immediately.