Browser Use SDKs
BrowserReal is a drop-in for Browser Use Cloud’s v4 API for browsers: the same
paths, bodies and responses (camelCase, ISO times, money as decimal strings, FastAPI’s { "detail": … } errors, 201
on create). Use the official Browser Use Cloud SDK for Python or TypeScript.
What differs is listed below.
Switching
Section titled “Switching”Change two lines: the key and the base URL. Create a Datum secret key under
API Keys in the dashboard and keep it in DATUM_API_KEY.
pip install browser-use-sdkexport DATUM_API_KEY=sk_...import osfrom browser_use_sdk.v4 import BrowserUse
client = BrowserUse( api_key=os.environ["DATUM_API_KEY"], # a Datum secret key base_url="https://browser.datum.network/api/v4",)browser = client.browsers.create(profile_id="…", timeout=30)npm i browser-use-sdk tsxexport DATUM_API_KEY=sk_...Save as start.mts and run npx tsx start.mts.
import { BrowserUse } from 'browser-use-sdk/v4';
const apiKey = process.env.DATUM_API_KEY;if (!apiKey) throw new Error('Set DATUM_API_KEY to your Datum secret key.');
const client = new BrowserUse({ apiKey, baseUrl: 'https://browser.datum.network/api/v4',});const browser = await client.browsers.create({ timeout: 15 });try { console.log(browser.cdpUrl);} finally { await client.browsers.stop(browser.id);}Both SDKs support browsers.create, browsers.get, browsers.list, browsers.stop, browsers.downloads, profiles
and extensions. Use the HTTP routes to manage network policies, change a running browser’s
proxy, or stop with force. Datum accepts X-Browser-Use-API-Key and Authorization: Bearer sk_….
To drive a session from a Browser Use agent in either language, see the agent examples.
What is the same
Section titled “What is the same”- Browsers: create with Browser Use’s options, list with
filterByandmetadata, get one, stop it, read its downloads, change its proxy while it runs. - Profiles, network policies and extensions, with Browser Use’s validation rules and limits.
- Recordings:
enableRecording, thenrecordingUrlon the browser once it stops.
What is different
Section titled “What is different”| Browser Use Cloud | BrowserReal | |
|---|---|---|
Proxy when proxyCountryCode is omitted |
A residential address in the US | None: the machine’s own address, unless the profile has a proxy. Ask for a country to get one. |
| Price | $0.06 a browser hour, $5 a residential proxy GB, $0.20 a direct GB | $0.04 a browser hour, $3 a residential proxy GB, $0.12 a direct GB |
| Stop while another client is connected | Stops | Returns the browser, still active, with a stopRefused message, so one agent cannot pull the browser from under another. "force": true stops it regardless. |
| CAPTCHAs | Solved | Cloudflare Turnstile’s checkbox is clicked. reCAPTCHA and hCaptcha are not solved. |
| Agents, tasks, workspaces | Yes | Not part of BrowserReal: bring your own agent, Browser Use’s open-source one included. agentSessionId lists nothing. |
| Error codes | Browser Use’s | The same shape, with BrowserReal’s own codes: see Errors. |
BrowserReal’s own additions
Section titled “BrowserReal’s own additions”BrowserReal also supports these API fields and routes:
proxySticky: falseon a create request, orstickyon a proxy change: a new residential address for every connection.proxyImages: falseon create loads images from the machine’s own address rather than through the proxy, to save proxy traffic.enableAdBlocking: trueon create loads uBlock Origin Lite.enableAudio: trueon create plays browser sound in the live view and saves it when recording is enabled.force: trueon a stop.- Profile
settings: a screen size, locale, time zone and proxy that every session of the profile uses. POST /profiles/{id}/import: bring a Chrome profile folder or a Playwright storage state.- On a browser:
profileId,proxySticky,proxyImages,directUsedMb,directCost,finishReason,error, andstopRefusedon a refused stop. - An
Idempotency-Keyheader onPOST /browsers: see the API overview.
Use the API’s camelCase names for Datum-specific create fields. In Python, use
client.browsers.create(proxy_country_code="de", proxySticky=False, networkPolicyId=policy_id).
In TypeScript, pass the extra fields through a variable, for example
client.browsers.create({ proxyCountryCode: 'de', ...datumOptions }) where
datumOptions = { proxySticky: false, networkPolicyId: policyId }.
The Python SDK drops response fields it does not know (profileId, finishReason, error, directCost,
stopRefused and the others above), from browsers.get too: read them with a plain HTTP request. The TypeScript SDK
passes them through untyped.
Not available yet
Section titled “Not available yet”- A custom proxy’s
caBundle,caBundleUrlandignoreCertErrors(returns422). - reCAPTCHA and hCaptcha solving (Cloudflare Turnstile is solved).
- Uploading a file into a running browser.