browser
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBright Data - Browser
Bright Data - Browser
The user already wrote the automation. This skill changes the launch line so it runs on Bright Data's cloud browser instead of the local one, wires in the credentials that line needs, and runs it once to prove it connects. Their automation logic does not move.
用户已经编写了自动化代码。本 skill 的作用是修改启动配置,使其改为在 Bright Data 的云端浏览器而非本地浏览器上运行,配置该启动方式所需的凭据,并运行一次以证明连接成功。自动化逻辑本身无需改动。
The one question
唯一的问题
Who does the clicking - your code, your AI model, or us?
| Who clicks | Where it goes |
|---|---|
| Their code: Playwright, Puppeteer, or Selenium | Stay here. Point it at our cloud browser, nothing to rewrite. |
| Their computer-use model, the AI that clicks by itself | Stay here. Same swap, same endpoint. |
| The agent itself, step by step from a terminal | Stay here and drive |
| Us | |
Ask it when the request names a framework, a technique, or an agent but leaves who drives the browser unstated. Ask it once, then act. A user holding working Playwright code and a blocked local browser never needs to hear about Scraper Studio.
由谁执行点击——你的代码、你的 AI 模型,还是我们?
| 谁执行点击 | 如何处理 |
|---|---|
| 用户的代码:Playwright、Puppeteer 或 Selenium | 继续使用本 skill。将其指向我们的云端浏览器,无需重写。 |
| 用户的 computer-use model,即自主点击的 AI | 继续使用本 skill。进行同样的替换,使用同一个 endpoint。 |
| Agent 本身,从终端逐步操作 | 继续使用本 skill 并驱动 |
| 我们 | |
当请求提到某个 framework、technique 或 agent,却未说明由谁驱动浏览器时,先询问一次,然后执行。对于持有可正常工作的 Playwright 代码且本地浏览器被封锁的用户,绝不需要提到 Scraper Studio。
What the swap is
这次替换
The local launch call becomes a remote connect call against a websocket:
wss://brd-customer-<CUSTOMER_ID>-zone-<ZONE>:<PASSWORD>@brd.superproxy.io:9222Selenium is the one exception. It speaks WebDriver, not CDP, so it uses on port with the same credentials. Selectors, waits, navigation, screenshots and page logic all stay exactly as written.
https://9515The agent fills the three pieces itself, with free API reads and the key the user already has (, else the CLI's stored login), never with placeholders left for the user. No key anywhere means the user is not set up: hand off to , never ask for a key in chat. references/connect.md has the lookup and the two ways to wire it.
BRIGHTDATA_API_KEYagent-onboarding原本的本地启动调用将改为通过 websocket 发起远程连接调用:
wss://brd-customer-<CUSTOMER_ID>-zone-<ZONE>:<PASSWORD>@brd.superproxy.io:9222Selenium 是唯一的例外。它使用 WebDriver 而非 CDP,因此使用 和端口 ,并使用相同凭据。选择器、等待、导航、截图和页面逻辑都保持原样。
https://9515Agent 会自行填写这三部分,使用免费的 API 读取调用以及用户已有的 key(,否则使用 CLI 中保存的登录凭据),绝不留下需要用户填写的占位符。如果完全没有 key,说明用户尚未完成设置:转交 ,绝不要在对话中索要 key。references/connect.md 中包含查找方式以及接入的两种方式。
BRIGHTDATA_API_KEYagent-onboardingThe zone
Zone(区域)
Find the Browser API zone by type, not by name, before writing the string:
bdata zones --jsonTake the of the entry whose is , and use it wherever the connect string says . It is after , on an account made by agent registration, when the MCP server set the account up, and any name at all when a person created it by hand: read the type, then use whatever name it carries. This is one free read and it starts no session. If is not recognized, the CLI is not installed or npm's global directory is not on PATH; both fixes live in the skill's Install section.
name"type""browser_api"<ZONE>cli_browserbdata loginagent_browser_apimcp_browserbdataagent-onboardingNo entry of that type at all is not a connect string to fix, but it is not an account problem yet either. The remedy, after the user agrees (it changes their account), is one free call, with body . creates one on demand too, but that starts a billable session, and it uses the name unless given or , so on an account whose browser zone has another name, pass that name or it makes a second zone (with an agent-registration key it cannot create one and fails instead; pass ). Do not reach for on a machine that is already logged in: it replaces the stored key. Escalate to when the creation is refused with or , or on a permissions refusal (a key from agent registration, or a user without the Admin or Ops role, cannot create zones): the person then makes the zone in the Control Panel.
POST https://api.brightdata.com/zone{"zone":{"name":"cli_browser","type":"browser_api"},"plan":{"type":"browser_api"}}bdata browser opencli_browser--zone <name>BRIGHTDATA_BROWSER_ZONE--zone agent_browser_apibdata loginagent-onboardingkyc_requiredbusiness_account_required在编写连接字符串之前,按类型而非名称查找 Browser API zone:
bdata zones --json取 为 的条目的 ,并在连接字符串中 所指的位置使用它。执行 后,它是 ;对于通过 agent registration 创建的账户,它是 ;当 MCP server 设置账户时,它是 ;如果用户手动创建,则名称任意:读取类型,然后使用它实际携带的名称。这只需一次免费读取,不会启动会话。如果系统无法识别 ,说明 CLI 未安装,或 npm 的全局目录不在 PATH 中;两种修复方法都在 skill 的 Install 部分。
"type""browser_api"name<ZONE>bdata logincli_browseragent_browser_apimcp_browserbdataagent-onboarding如果完全没有该类型的条目,这并不是需要修复的连接字符串问题,但也不能直接判定为账户问题。补救方法是在用户同意后(这会更改其账户),发起一次免费调用:,请求体为 。 也会按需创建一个,但会启动计费会话,并且除非指定 或 ,否则使用名称 ;因此,如果账户的 browser zone 名称不同,应传入该名称,否则会创建第二个 zone(使用 agent registration key 时无法创建并直接失败;此时传入 )。不要在已经登录的机器上执行 :它会替换已保存的 key。当创建请求因 或 被拒绝,或因权限被拒(来自 agent registration 的 key,或不具备 Admin 或 Ops 角色的用户,都无法创建 zone)时,转交 :此时需要由用户在 Control Panel 中创建 zone。
POST https://api.brightdata.com/zone{"zone":{"name":"cli_browser","type":"browser_api"},"plan":{"type":"browser_api"}}bdata browser open--zone <name>BRIGHTDATA_BROWSER_ZONEcli_browser--zone agent_browser_apibdata loginkyc_requiredbusiness_account_requiredagent-onboardingThe boundaries
边界
Building the scraper belongs to , and so does any ask where the user wants data and does not care what drives the browser. One page as markdown, HTML, or a screenshot belongs to . Anything starting from a search query belongs to . This skill is for a driver that already exists.
scrapefetchsearch构建 scraper 属于 ,用户只想要数据、不关心由什么驱动浏览器的请求也属于 。将单个页面转换为 markdown、HTML 或截图属于 。从搜索查询开始的任务属于 。本 skill 仅适用于已经存在的 driver。
scrapescrapefetchsearchLogging into sites
登录网站
Typing passwords through Browser API is blocked by default. It needs KYC plus a compliance exception. Never promise a login flow before that is approved, and never retry into the block. The deep detail lives one skill over: open and read the file inside it, which lists what needs KYC, what does not, and the approval path.
agent-onboardingreferences/auth.md默认情况下,禁止通过 Browser API 输入密码。此功能需要完成 KYC 并获得合规例外。在获得批准前,绝不要承诺可以执行登录流程,也不要在遇到阻止后反复重试。详细说明位于另一个 skill 中:打开 并阅读其中的 文件,该文件列出了哪些操作需要 KYC、哪些不需要,以及审批流程。
agent-onboardingreferences/auth.mdRead next
接下来阅读
- Read references/connect.md before writing the connect line - the exact string, where the key and each of the three pieces come from, the two designs (endpoint in a secret, or looked up at run time) and when to pick which, and the Playwright edit end to end.
- Read references/errors.md the moment a connect attempt fails - the 407 codes and what each means, the Browser API auth codes, and the retry rule.
client_100xx
- 在编写连接行之前,阅读 references/connect.md——精确的字符串、key 与三个组成部分的来源、两种设计(将 endpoint 放入 secret,或在运行时查找)以及何时选择哪一种,还有 Playwright 端到端的修改方式。
- 一旦连接尝试失败,立即阅读 references/errors.md——407 错误码及其含义、Browser API 认证错误码和重试规则。
client_100xx
Red flags - stop if you catch yourself doing one of these
危险信号——发现以下情况时停止
- Offering Scraper Studio to a user who already has working driver code
- Rewriting their automation instead of changing the endpoint line
- Pointing Selenium at port 9222, or Playwright at 9515
- Printing, logging, or committing the assembled endpoint, which carries the password, or printing a connect error without redacting it
- Running in a terminal: it prints the zone password
bdata zones info <zone> - Leaving the user a variable to fill, or asking for a key, when the agent can read the stored key itself
- Retrying a 407 without reading which code came with it
- Sending the user to KYC before an error actually refused the connect
- Hardcoding or guessing a zone name instead of finding the zone by type
browser_api - Creating a zone without asking the user first
- 向已经拥有可用 driver 代码的用户提供 Scraper Studio
- 重写其自动化代码,而不是只修改 endpoint 行
- 将 Selenium 指向端口 9222,或将 Playwright 指向 9515
- 打印、记录或提交包含密码的完整 endpoint,或在输出连接错误时未做脱敏
- 在终端运行 :它会输出 zone 密码
bdata zones info <zone> - 在 Agent 能够自行读取已保存的 key 时,仍给用户留下需要填写的变量,或索要 key
- 未查看随 407 一起返回的错误码就重试
- 在连接错误实际以拒绝形式返回之前,就让用户去完成 KYC
- 硬编码或猜测 zone 名称,而不是按类型查找 zone
browser_api - 未经用户询问就创建 zone