自定义输入
了解如何向输入架构添加自定义字段,以实现增强的数据管理和检索。
自定义输入
您可以向输入架构添加自定义字段,无论您在这些字段中发送什么内容,都将在结果中返回给每个记录/任务。这对以下场景很有用:- 统一架构:在不同的爬虫器/数据集中保持相同的输出结构。
- 索引/参考字段:传递
id、row_index或任何内部密钥,以便您可以轻松将结果匹配回原始输入行。
授权
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
查询参数
Dataset ID for which data collection is triggered.
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 report with the results.
Specifies the format of the response (default: ndjson).
ndjson, json, csv 请求体
List of input items to scrape.
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.
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"