browser-use
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Use
Browser Use
Browser Use provides cloud browsers and autonomous browser automation via API.
Docs:
- Open source library: https://docs.browser-use.com
- Cloud API: https://docs.cloud.browser-use.com
Browser Use 通过API提供云浏览器与自动化浏览器操作服务。
文档:
Setup
配置
API Key is read from clawdbot config at .
skills.entries.browser-use.apiKeyIf not configured, tell the user:
To use Browser Use, you need an API key. Get one at https://cloud.browser-use.com (new signups get $10 free credit). Then configure it:clawdbot config set skills.entries.browser-use.apiKey "bu_your_key_here"
Base URL:
https://api.browser-use.com/api/v2All requests need header:
X-Browser-Use-API-Key: <apiKey>API密钥从Clawdbot配置中的读取。
skills.entries.browser-use.apiKey如果未配置,请告知用户:
要使用Browser Use,您需要一个API密钥。请访问https://cloud.browser-use.com获取(新注册用户可获得10美元免费额度)。然后进行配置:clawdbot config set skills.entries.browser-use.apiKey "bu_your_key_here"
基础URL:
https://api.browser-use.com/api/v2所有请求都需要添加请求头:
X-Browser-Use-API-Key: <apiKey>1. Browser Sessions (Primary)
1. 浏览器会话(主要功能)
Spin up cloud browsers for Clawdbot to control directly. Use profiles to persist logins and cookies.
为Clawdbot启动可直接控制的云浏览器。使用配置文件来持久化登录状态和Cookie。
Create browser session
创建浏览器会话
bash
undefinedbash
undefinedWith profile (recommended - keeps you logged in)
使用配置文件(推荐 - 保持登录状态)
curl -X POST "https://api.browser-use.com/api/v2/browsers"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"profileId": "<profile-uuid>", "timeout": 60}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"profileId": "<profile-uuid>", "timeout": 60}'
curl -X POST "https://api.browser-use.com/api/v2/browsers"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"profileId": "<profile-uuid>", "timeout": 60}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"profileId": "<profile-uuid>", "timeout": 60}'
Without profile (fresh browser)
不使用配置文件(全新浏览器)
curl -X POST "https://api.browser-use.com/api/v2/browsers"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"timeout": 60}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"timeout": 60}'
**Response:**
```json
{
"id": "session-uuid",
"cdpUrl": "https://<id>.cdp2.browser-use.com",
"liveUrl": "https://...",
"status": "active"
}curl -X POST "https://api.browser-use.com/api/v2/browsers"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"timeout": 60}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"timeout": 60}'
**响应:**
```json
{
"id": "session-uuid",
"cdpUrl": "https://<id>.cdp2.browser-use.com",
"liveUrl": "https://...",
"status": "active"
}Connect Clawdbot to the browser
将Clawdbot连接到浏览器
bash
gateway config.patch '{"browser":{"profiles":{"browseruse":{"cdpUrl":"<cdpUrl-from-response>"}}}}'Now use the tool with to control it.
browserprofile=browserusebash
gateway config.patch '{"browser":{"profiles":{"browseruse":{"cdpUrl":"<cdpUrl-from-response>"}}}}'现在使用工具并指定即可控制该浏览器。
browserprofile=browseruseList/stop browser sessions
列出/停止浏览器会话
bash
undefinedbash
undefinedList active sessions
列出活跃会话
curl "https://api.browser-use.com/api/v2/browsers" -H "X-Browser-Use-API-Key: $API_KEY"
curl "https://api.browser-use.com/api/v2/browsers" -H "X-Browser-Use-API-Key: $API_KEY"
Get session status
获取会话状态
curl "https://api.browser-use.com/api/v2/browsers/<session-id>" -H "X-Browser-Use-API-Key: $API_KEY"
curl "https://api.browser-use.com/api/v2/browsers/<session-id>" -H "X-Browser-Use-API-Key: $API_KEY"
Stop session (unused time is refunded)
停止会话(未使用的时长将退款)
curl -X PATCH "https://api.browser-use.com/api/v2/browsers/<session-id>"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"status": "stopped"}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"status": "stopped"}'
**Pricing:** $0.06/hour (Pay As You Go) or $0.03/hour (Business). Max 4 hours per session. Billed per minute, refunded for unused time.
---curl -X PATCH "https://api.browser-use.com/api/v2/browsers/<session-id>"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"status": "stopped"}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"status": "stopped"}'
**定价:** 按需付费模式每小时0.06美元,企业版每小时0.03美元。每个会话最长4小时。按分钟计费,未使用时长可退款。
---2. Profiles
2. 配置文件
Profiles persist cookies and login state across browser sessions. Create one, log into your accounts in the browser, and reuse it.
bash
undefined配置文件可在多个浏览器会话间持久化Cookie和登录状态。创建一个配置文件,在浏览器中登录您的账户,之后即可重复使用。
bash
undefinedList profiles
列出配置文件
curl "https://api.browser-use.com/api/v2/profiles" -H "X-Browser-Use-API-Key: $API_KEY"
curl "https://api.browser-use.com/api/v2/profiles" -H "X-Browser-Use-API-Key: $API_KEY"
Create profile
创建配置文件
curl -X POST "https://api.browser-use.com/api/v2/profiles"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"name": "My Profile"}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"name": "My Profile"}'
curl -X POST "https://api.browser-use.com/api/v2/profiles"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"name": "My Profile"}'
-H "X-Browser-Use-API-Key: $API_KEY"
-H "Content-Type: application/json"
-d '{"name": "My Profile"}'
Delete profile
删除配置文件
curl -X DELETE "https://api.browser-use.com/api/v2/profiles/<profile-id>"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "X-Browser-Use-API-Key: $API_KEY"
**Tip:** You can also sync cookies from your local Chrome using the Browser Use Chrome extension.
---curl -X DELETE "https://api.browser-use.com/api/v2/profiles/<profile-id>"
-H "X-Browser-Use-API-Key: $API_KEY"
-H "X-Browser-Use-API-Key: $API_KEY"
**提示:** 您也可以使用Browser Use Chrome扩展程序从本地Chrome同步Cookie。
---3. Tasks (Subagent)
3. 任务(子代理)
Run autonomous browser tasks - like a subagent that handles browser interactions for you. Give it a prompt and it completes the task.
Always use - optimized for browser tasks, 3-5x faster than other models.
browser-use-llmbash
curl -X POST "https://api.browser-use.com/api/v2/tasks" \
-H "X-Browser-Use-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"task": "Go to amazon.com and find the price of the MacBook Air M3",
"llm": "browser-use-llm"
}'运行自动化浏览器任务——就像一个为您处理浏览器交互的子代理。只需提供提示,它就能完成任务。
请始终使用——针对浏览器任务优化,速度比其他模型快3-5倍。
browser-use-llmbash
curl -X POST "https://api.browser-use.com/api/v2/tasks" \
-H "X-Browser-Use-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"task": "Go to amazon.com and find the price of the MacBook Air M3",
"llm": "browser-use-llm"
}'Poll for completion
轮询任务完成状态
bash
curl "https://api.browser-use.com/api/v2/tasks/<task-id>" -H "X-Browser-Use-API-Key: $API_KEY"Response:
json
{
"status": "finished",
"output": "The MacBook Air M3 is priced at $1,099",
"isSuccess": true,
"cost": "0.02"
}Status values: , , , ,
pendingrunningfinishedfailedstoppedbash
curl "https://api.browser-use.com/api/v2/tasks/<task-id>" -H "X-Browser-Use-API-Key: $API_KEY"响应:
json
{
"status": "finished",
"output": "The MacBook Air M3 is priced at $1,099",
"isSuccess": true,
"cost": "0.02"
}状态值:(待处理)、(运行中)、(已完成)、(失败)、(已停止)
pendingrunningfinishedfailedstoppedTask options
任务选项
| Option | Description |
|---|---|
| Your prompt (required) |
| Always use |
| Starting page |
| Max actions (default 100) |
| Reuse existing session |
| Use a profile for auth |
| Even faster execution |
| Visual understanding |
| 选项 | 描述 |
|---|---|
| 您的任务提示(必填) |
| 请始终使用 |
| 起始页面 |
| 最大操作步数(默认100) |
| 复用现有会话 |
| 使用配置文件进行身份验证 |
| 更快的执行速度 |
| 视觉识别能力 |
Full API Reference
完整API参考
See references/api.md for all endpoints including Sessions, Files, Skills, and Skills Marketplace.
请查看references/api.md获取所有端点的信息,包括会话、文件、技能和技能市场。