Extract search engine results using Bright Data SERP API. Extract structured data from major search engines including Google, Bing, Yandex, DuckDuckGo, and more. Get organic results, paid ads, local listings, shopping results, and other SERP features.
在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。
认证方法:
Authorization: Bearer YOUR_API_KEY示例:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df了解如何获取 Bright Data API Key: https://docs.brightdata.com/cn/api-reference/authentication#如何生成新的-api-key?
设置为 true 以异步执行
区域标识符,用于定义您的 Bright Data 产品配置。每个区域包含目标规则、输出偏好和访问权限。 管理区域: https://brightdata.com/cp/zones
"serp_api1"
要抓取的完整目标 URL。必须包含协议(http/https),并可公开访问。
"https://www.google.com/search?q=pizza"
响应格式: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"
OK
The response is of type string.
"OK"