用途:通过 Browser Use 云端 API 执行 AI 驱动的浏览器自动化,用自然语言描述任务,返回结构化结果。适合复杂多步网页流程、被反爬拦截的站点、表单填写与提交、需要步骤截图的场景,以及本地无法控制浏览器时。
主要能力:创建任务、查询状态、停止任务、查看余额。任务状态为 pending、started、finished、failed;完成后返回 output 结果文本、steps 操作数组(含截图)、cost 费用与 isSuccess。
使用方式:设置环境变量 BROWSER_USE_API_KEY 后调用 API。创建任务:curl -s -X POST https://api.browser-use.com/api/v2/tasks -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" -H "Content-Type: application/json" -d '{"task": "Go to example.com and extract the main heading"}'。轮询结果:curl -s "https://api.browser-use.com/api/v2/tasks/TASK_ID" -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"。停止任务:POST https://api.browser-use.com/api/v2/tasks/{taskId}/stop。查询余额:curl -s https://api.browser-use.com/api/v2/credits -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"。也可用辅助脚本 scripts/browser-use.sh,如 ./scripts/browser-use.sh "Go to hacker news and get the top 3 stories",加 --no-wait 仅提交不等待。创建任务可选 llm 参数(如 gemini-3-flash-preview),默认使用快速模型。
限制:简单页面抓取应改用 web_fetch;有本地浏览器时用 browser 工具;高频大批量抓取应使用 Code Use 或本地抓取。费用约每任务 0.01–0.05 美元,视复杂度而定。其余细节暂未提供。