from browser_use_sdk.v4 import BrowserUsewith BrowserUse() as client: run = client.runs.create("Find the top Hacker News story") result = client.runs.wait_for_completion(run.id) print(result.result)
import { BrowserUse } from "browser-use-sdk/v4";const client = new BrowserUse();const run = await client.runs.create({ task: "Find the top Hacker News story",});const result = await client.runs.waitForCompletion(run.id);console.log(result.result);
curl https://api.browser-use.com/api/v4/runs \ -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"task":"Find the top Hacker News story"}'
Install the latest SDK with pip install --upgrade browser-use-sdk or
npm install browser-use-sdk@latest. Curl needs no installation.Every new run implicitly creates a session for its
conversation and live browser, plus a workspace for
persistent files.
Copy API V4 docs
Give the compact context file to your coding agent.
Was this page helpful?
⌘I
Assistant
Responses are generated using AI and may contain mistakes.