端点:POST /datasets/v3/trigger
创建数据采集请求。
请求
数据集 ID,系统会根据此 ID 触发数据采集任务 You can see our available datasets here.
Example: dataset_id=gd_l1vikfnt1wgvvqz95w
If you want to trigger a collection that includes a 发现型抓取工具 phase, you should pass discover_new as the type.
type=discover_new
should always be sent when discover_by
is provided.
Example: type=discover_new
Relevant ONLY for discovery type APIs - e.g.
type=discover_new
Example:discover_by=keyword
Available options:
keyword
,best_sellers_url
,category_url
,location
and more (according to the specific API)
当采集任务包含数据发现阶段时,用于限制每个输入参数返回的结果数量
Example: discover by keywords - limit to 10 results per keyword
Ensure the output includes errors report for easier troubleshooting.
Example: include_errors=true
采集完成后将接收通知的 URL。
Notification will contain
snapshot_id
and status
.
Example: notify=https://notify-me.com/
Authorization header to be used when sending notification to
notify
URL or delivering data via webhook endpoint
Example: auth_header=QWxhZGRpbjpPcGVuU2VzYW1l
用于交付数据的 Webhook URL。
Example: endpoint=https://webhook-url.com
指定交付至 Webhook 端点的数据格式。
Supported formats:JSON
,NDJSON
,JSONL
,CSV
Example:format=json
默认情况下,数据会以压缩格式发送至 Webhook。如想将数据以未压缩的格式发送,则需将参数设置为 “true”。
Example: uncompressed_webhook=true
其他交付方法:您可以使用此 API 调用返回的 snapshot_id 触发交付 API,从而将数据发送至特定的存储服务器(Amazon S3, Microsoft Azure 等),或使用下载 API 直接下载数据。
正文
抓取器的输入配置。 数据可以 JSON 或 CSV 文件提供:网页抓取工具的种类
不同的抓取工具可能需要设置不同的输入参数以采集数据。 抓取工具主要分为两类:1. PDP 抓取工具 抓取工具
此类抓取工具需要输入 URL 作为参数。 PDP 抓取工具 抓取工具 抓取工具可从网页中提取详细的产品信息,例如规格、定价和功能等2. 发现型抓取工具
发现型抓取工具可让您通过搜索、类别、关键字等探索并查找新的实体/产品。
请求示例
PDP 抓取工具 抓取工具
with URL input
Input format for PDP 抓取工具 抓取工具
is always a URL, pointing to the page to be scraped.
样本请求
发现型抓取工具 input based on the discovery
method
样本请求
discovery
can vary according to the specific scraper. 其输入格式可以为:
返回
Object containingsnapshot_id
, which represents the ID of your request and can be used in the next APIs.
样本响应