Skip to main content
POST
Deliver a snapshot to Amazon S3, Azure Blob Storage or a Webhook
POST /webarchive/dump 将已完成搜索的快照传送到 Amazon S3、Azure Blob Storage、Google Cloud Storage 或 webhook,并返回 dump_id
要使用 S3 存储传递,您首先需要执行以下操作:
  • 创建一个 AWS 角色,为 Bright Data 授予访问您系统的权限。
    • 在此设置期间,Amazon 会要求您提供一个与角色一起使用的”外部 ID”。
    • 您的 S3 外部 ID 是您的 Bright Data 账户 ID,可在 账户设置 中找到
  • 创建角色后,您需要允许 Bright Data 传递角色 AssumeRole 该角色。
    • Bright Data 传递角色是:arn:aws:iam::422310177405:role/brd.ec2.zs-dca-delivery
要使用 Google Cloud Storage 传递,请创建一个存储桶并提供所需的 GCP 传递设置。
webhook 传递策略不适合大型数据转储,除非您在自己的基础设施上托管 webhook。第三方检查工具(如 webhook.site)施加了严格的请求体大小限制,将无法接收可能达到 1 GB 大小的有效负载。对于大型传递,请改用 Amazon S3Azure Blob StorageGoogle Cloud Storage
常见数据转储参数:
  • search_id(必需):来自已完成搜索的搜索 ID
  • max_entries(可选):限制要包含在数据转储中的文件数量
  • delivery(必需):传递配置(S3、Azure、GCP 或 webhook)
如果您运行的是 linux/macos 机器,可以使用此页面上的代码模拟 Bright Data 的传递 webhook 之一。

什么情况会返回 400

当请求体未通过校验时,POST /webarchive/dump 返回 HTTP 400。响应包含 error 摘要和列出每个校验失败字段的 details 数组。常见原因:
  • 缺少 search_id
  • 缺少 delivery
  • delivery.settings 与所选的 delivery.strategy 不匹配。每种策略有各自的必需设置:Amazon S3 需要 bucketassume_role,Google Cloud Storage 需要 bucket,Azure Blob Storage 需要 containercredentials,webhook 需要 url
请修正 details[].path 中指出的字段后重新发送请求。

授权

Authorization
string
header
必填

Use your Bright Data API Key as a Bearer token in the Authorization header.

How to authenticate:

  1. Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
  2. Include the API Key in the Authorization header of your requests
  3. Format: Authorization: Bearer YOUR_API_KEY

Example:

Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication

请求体

application/json
search_id
string
必填

Search ID from a completed search

delivery
Amazon S3 · object
必填
max_entries
integer

Maximum number of files to include in the dump

响应

Dump created successfully

dump_id
string
必填

ID of the created dump

示例:

"ucd_abc123-1234567890"