Bright Data Unlocker API 可帮助您绕过反机器人措施、管理代理,并自动解决 CAPTCHA,让网页数据采集更加轻松。
在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。
获取 API Key:https://brightdata.com/cp/setting/users
示例:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df
设置为 true 以进行异步请求
定义您的 Bright Data 产品配置的区域标识符。每个区域包含目标规则、输出偏好和访问权限。 管理区域:https://brightdata.com/cp/zones
"web_unlocker1"
要抓取的完整目标 URL,必须包含协议 (http/https) 并可公开访问。
"https://example.com/page"
响应格式:raw 返回 HTML 内容字符串,json 返回结构化数据。
raw, json "json"
通过代理请求 HTML 的方法为 GET。
"GET"
代理所在国家的两字母 ISO 3166-1 代码(例如 us, gb, de, ca, au)。如果未指定,系统会根据区域配置自动选择最佳位置。
国家代码列表:https://docs.brightdata.com/cn/general/faqs#where-can-i-see-the-list-of-country-codes
"us"
额外响应格式转换:markdown 将 HTML 内容转换为干净的 markdown 格式,screenshot 捕获渲染页面的 PNG 图片。
markdown, screenshot "markdown"
成功
The response is of type string.
"成功"