Choosing the backend
A session can run on three backends. Say which one with source in the body of POST /browser/v1/sessions.
source | Backend | Use it when | Proxy | Billing |
|---|---|---|---|---|
{ "type": "cloud" } | Browser Run (Cloudflare) | You want the fastest start and need no proxy. A site can detect that the browser is automated. | Not allowed | Billed per millisecond(See the live price) |
{ "type": "container" } | Our own Chrome container | You need a browser that does not look automated, with or without a proxy. With a proxy the exit address is fixed. | Optional | Time Billed per millisecond(See the live price) plus traffic Metered by use(See the live price) |
{ "type": "byob", "browser": "byb_…" } | The user’s own paired Chrome or Edge | Pages must load from the user’s own network and sign-ins. | Not allowed | Free |
The short form { "byob": "byb_…" } is the same as the third row.
When source is absent the old rule applies: a session with proxies runs in the container, any other session on Browser Run. The session you get back reports the backend it really used as source.type (cloud, container or byob; byob also carries browser).
Examples
These are request bodies, not recorded results.
{ "source": { "type": "container" } }{ "source": { "type": "container" }, "proxies": [{ "type": "external", "server": "isp.example.net:8003", "username": "u1", "password_secret": { "vault_id": "vlt_1", "secret": "vsec_1" } }]}Without a proxy the container’s traffic leaves from the container’s own address, and the session reports it in the cloudBrowser.session.egressObserved event with proxyHost set to direct. With a proxy see Fixed-exit proxy.
Traffic is billed for every container session
A container session is billed for the bytes the browser moves, with or without a proxy: proxyBytes on the session, one browser_proxy_bytes line next to browser_ms in the single usage record written when the session ends. Browser Run and byob sessions have no traffic line.
Errors
| code | HTTP | When | What to do |
|---|---|---|---|
INVALID_PARAMS | 400 | source.type is cloud and proxies is also sent (Browser Run cannot use a proxy; use source.type container). | Use source.type container, or drop the proxy. |
INVALID_PARAMS | 400 | byob with proxies or with a login-state context. | Drop the proxy or the context. |
INVALID_PARAMS | 400 | An unknown type, an extra key, or a malformed browser id. | Send one of the four forms above. |
PROVIDER_UNSUPPORTED | 501 | The container backend is not opened for your organization (source.type container, or proxies). | Ask us to open it, or use cloud. |
PROVIDER_FAILED | 502 | The container did not start, or its proxy was unreachable. Retryable. | Retry; check the proxy. |
PROVIDER_CAPACITY | 429 | The container backend is rolling out. Retryable. | Retry shortly. |
A login state bound to a proxy counts as a proxy: it cannot be used with source.type cloud.
Next
- Fixed-exit proxy
- Drive the user’s own browser
- Cloud browser API: every endpoint, parameter and error code.