Skip to main content
POST
Scrape data and return it directly in the response.

自定义输入

您可以向输入架构添加自定义字段,无论您在这些字段中发送什么内容,都将在结果中返回给每个记录/任务。这对以下场景很有用:
  • 统一架构:在不同的爬虫器/数据集中保持相同的输出结构。
  • 索引/参考字段:传递 idrow_index 或任何内部密钥,以便您可以轻松将结果匹配回原始输入行。

授权

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

查询参数

dataset_id
string
必填

Dataset ID for which data collection is triggered.

custom_output_fields
string

List of output columns, separated by | (e.g., url|about.updated_on). Filters the response to include only the specified fields.

示例:

"url|about.updated_on"

include_errors
boolean

Include errors report with the results.

format
enum<string>
默认值:json

Specifies the format of the response (default: ndjson).

可用选项:
ndjson,
json,
csv

请求体

application/json
input
object[]
必填

List of input items to scrape.

示例:
custom_input_fields
string[]

List of custom input field names whose values are passed through and returned unchanged in the results for each record.

The name of a custom input field to be accepted and returned in the results.

示例:
custom_output_fields
string

List of output columns, separated by | (e.g., url|about.updated_on). Filters the response to include only the specified fields.

示例:

"url|about.updated_on"

响应

OK

The response is of type string.

示例:

"OK"