Browser Use

Hosted Agents

Give an agent a task and get the result.

Browsers

Launch a cloud browser and connect to it from your code.

Get an API key and export it:

export BROWSER_USE_API_KEY=your_key

Install the SDK

Skip this step if you use curl.

pip install browser-use-sdk

Run a hosted agent

from browser_use_sdk.v4 import BrowserUse

client = BrowserUse()
run = client.runs.create(
    "Find the top Hacker News story",
    model="grok-4.5",
)
run = client.runs.wait_for_completion(run.id)
print(run.result)

Control a browser

Launch a browser, connect to its CDP URL, then stop it:

from browser_use_sdk.v3 import BrowserUse

client = BrowserUse()
browser = client.browsers.create(proxy_country_code="us")
print(browser.cdp_url)

# When finished:
client.browsers.stop(browser.id)

Closing Playwright, Puppeteer, or CDP does not stop the browser. Use client.browsers.stop(browser.id) or call PATCH /api/v4/browsers/{id} with {"action":"stop"}.

Copy for an LLM

Give your coding agent the compact API V4 context.

Read the original on docs.browser-use.com ↗