cURL
获取数据
接收批量数据
使用 GET /dca/dataset?id=<collection_id> 获取异步 Scraper Studio 批量采集的结果。采集进行中返回状态对象,采集就绪后返回 JSON 记录数组。
GET
cURL
使用
当采集就绪后(HTTP 200):
具体的字段集取决于您在构建采集器时定义的输出模式。默认情况下,每个成功的输入对应一行。
GET /dca/dataset?id=<collection_id> 获取异步 Bright Data Scraper Studio 批量采集的结果。当采集仍在运行时,该端点返回一个状态对象。当采集就绪后,它会返回一个 JSON 记录数组。
请将 POST /dca/trigger 返回的
collection_id 用作本端点的 id 查询参数。批量采集结果在采集后 16 天内可供下载。为了避免过期,请在 16 天内下载数据,或配置推送递送方式以将其自动发送到您的存储。
请求
响应
当采集仍在构建中时(HTTP 202):获取结果
当采集仍在运行时,该端点返回202 Accepted 以及一个状态对象。当采集就绪后,它返回 200 OK 以及一个 JSON 记录数组。
对于可能耗时数分钟或数小时的长时间采集,请避免频繁轮询。请改用以下方式之一:
- 以较长的时间间隔定期检查采集状态。
- 配置推送递送方式,例如 webhook、Amazon S3、Google Cloud Storage、Azure Blob Storage、SFTP/FTP 或电子邮件。
- 使用控制面板监控运行进度。
错误
授权
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
- Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
- Include the API Key in the Authorization header of your requests
- Format:
Authorization: Bearer YOUR_API_KEY
Example:
Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
查询参数
Collection ID returned by POST /dca/trigger. Use this value as the id query parameter.
示例:
"j_abc123def456"
响应
Dataset (Ready)