Skip to content

Quickstart

  1. Create a secret key. In the dashboard, open Connect and create a secret key (sk_…). Keep it on your server: it spends your organization’s balance.

    Terminal window
    export BROWSER_USE_API_KEY=sk_...

    The variable has Browser Use’s name so that its SDKs pick it up as they are. Any name works.

  2. Install a client. BrowserReal speaks plain HTTP. With Python, Browser Use’s SDK saves you writing the calls. Drive the browser with the Playwright, Puppeteer or Browser Use you already use, as they are: there is no browser to download, and nothing to patch for stealth.

    Terminal window
    pip install browser-use-sdk playwright
  3. Start a browser, use it, stop it.

    import asyncio, os
    from browser_use_sdk.v4 import AsyncBrowserUse
    from playwright.async_api import async_playwright
    async def main():
    async with AsyncBrowserUse(
    api_key=os.environ["BROWSER_USE_API_KEY"],
    base_url="https://api.datum.org/api/v4",
    ) as client:
    browser = await client.browsers.create(timeout=15)
    try:
    async with async_playwright() as p:
    chrome = await p.chromium.connect_over_cdp(browser.cdp_url)
    page = await chrome.contexts[0].new_page()
    await page.goto("https://example.com")
    print(await page.title())
    finally:
    await client.browsers.stop(browser.id) # saves the profile, ends the billing
    asyncio.run(main())
  4. Watch it. Open the browser’s liveUrl, or find it on the dashboard’s Sessions page, to see the screen and take control yourself. Every session, with its cost and recording, is in History.

Hand the browser to a Browser Use agent by its CDP address:

from browser_use import Agent, Browser, ChatAnthropic
agent = Agent(
task="Find the top story on news.ycombinator.com",
llm=ChatAnthropic(model="claude-sonnet-4-5"),
browser=Browser(cdp_url=browser.cdp_url),
)
await agent.run()