Skip to main content
GET
cURL
  • 异步用法 通过异步端点(/trigger)触发数据采集任务,获得 snapshot_id,轮询监控进度 API 直到状态为 ready,然后下载结果。
  • 同步用法 如果同步请求(/scrape)超过 1 分钟超时,会获得 snapshot_id,可用于轮询监控进度 API,并在结果就绪后下载。
监控进度 API 通过区分即时和延迟的结果获取,兼顾灵活性和稳定性,可高效处理大数据量。
如果请求耗时过长,建议改用异步请求。

授权

Authorization
string
header
必填

在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。

认证方法:

  1. 从 Bright Data 账户设置获取您的 API Key: https://brightdata.com/cp/setting/users
  2. 在请求的 Authorization 头中包含 API Key
  3. 格式: Authorization: Bearer YOUR_API_KEY

示例:

了解如何获取 Bright Data API Key: https://docs.brightdata.com/cn/api-reference/authentication#如何生成新的-api-key?

路径参数

snapshot_id
string
必填

触发采集时返回的 ID

示例:

"s_m4x7enmven8djfqak"

响应

成功

statusfailed 时,error_message 为以下之一:

  • Something went wrong. Our team is looking into it. 出现问题,团队正在处理
  • Account is suspended 账户已被暂停
  • Account is new, please activate it in account settings. URL 账户为新账户,请在账户设置中激活
  • No data found in discovery 发现中未找到数据
  • Snapshot is empty 快照为空
  • Failed to deliver snapshot 快照交付失败
  • Failed to download response 下载响应失败
  • Failed to trigger collector 触发收集器失败
  • Internal Server Error 内部服务器错误
  • Input validation failed: DETAILS 输入验证失败: DETAILS
snapshot_id
string
dataset_id
string
status
enum<string>

快照状态

可用选项:
starting,
running,
ready,
failed