browser_settings / browserSettings when you create a V4 run to choose
another country:
The current TypeScript SDK type requires
proxyCountryCode whenever
browserSettings is present. Use "us" to keep the default, or null to
disable the managed proxy.Disable proxies
Passnull for QA or internal sites that do not need a residential proxy:
Custom proxy
Custom proxies are available to all accounts, including free and pay-as-you-go accounts. No subscription is required. Normal credit, spend, and concurrency limits still apply. The request format depends on what you are creating:browser_settings is the Python SDK keyword for agent runs. In REST JSON,
the agent-run field is browserSettings.
Standalone browsers
For a browser you control with Playwright, Puppeteer, or another CDP client, putcustomProxy directly in the request body:
curl
username and password if
your proxy does not require authentication. Do not wrap these settings in
browserSettings or browser_settings on /api/v4/browsers.
Keep the returned browser ID and stop the browser with
PATCH /api/v4/browsers/{id} and {"action":"stop"} when finished. See the
Create browser reference and
Browser quickstart.
Agent runs
For a hosted agent, pass the proxy in the run’s browser settings:proxyCountryCode and must be passed again when a
follow-up provisions a new browser. See the Create run
reference for the complete settings object.
Custom proxy fields
Use
caBundle or caBundleUrl for a proxy that decrypts traffic with its own
CA, such as a card-vault proxy. The browser trusts that CA, and all other
sites keep full certificate checks. API responses never include the password,
caBundle or caBundleUrl.
Change the proxy of a running browser
PATCH /api/v4/browsers/{id}/proxy changes the proxy of a running standalone
browser. The browser does not restart, so tabs, cookies and local storage
stay. GET /api/v4/browsers/{id}/proxy returns the current proxy. Both
endpoints need an API key with the v4:browsers:create scope (Write on
browsers), and they also exist in API v2 and v3.
For example, an agent can shop on the residential proxy and change to a
card-vault proxy at the payment step:
curl
{"mode": "managed", "country": "us"},
or send a new customProxy for the next proxy login.
The response has the new state:
exitIpisnullfor a custom proxy, because Browser Use does not send extra requests through your proxy.- A change with a new CA takes about 5 seconds, while the browser loads the CA. Other changes take less than 1 second.
- Send one change at a time. A second change for the same browser returns
409until the first one ends. - Custom mode does not accept
country,targetorrotate(422). - A browser on a custom proxy needs
modein each change. Else the change returns409. - Custom mode is not available on the EU route (
422). 409also means the browser is stopped, belongs to an agent run, or has the agentic autofill extension (custom mode only).