Start a batch scrape
brightdata.web.scrape.job.startStart an asynchronous scraping job over a batch of URLs and get a snapshot id back
- 价格
- $0.0015/result按供应商原价
- 成功率
- 99.3%近 30 天 · 631 次
- 延迟 p50
- 394 毫秒p95 1 秒
- 最后验证
- 2026年7月28日实测可用
POSThttps://toolswitch.dev/v1/tools/brightdata.web.scrape.job.start?dataset_id=gd_l1vikfch901nx3by4预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
returns {snapshot_id: "s_…"} immediately; nothing is billed until records are delivered. Always set limit_per_input on a discovery run — a discover_new job with no cap decides for itself how many records to produce, and each one is billable
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
type | 字符串 | 可选 | set to discover_new to run a discovery crawl instead of scraping the given URLs | discover_new |
format | 字符串 | 可选 | json | ndjson | jsonl | csv | |
notify | 布尔 | 可选 | fire a webhook when the job finishes | |
endpoint | 字符串 | 可选 | webhook URL used when notify is set | |
dataset_id | 字符串 | 必填 | which managed scraper to run | gd_l1vikfch901nx3by4 |
auth_header | 字符串 | 可选 | Authorization header value Bright Data should send to your webhook | |
discover_by | 字符串 | 可选 | with type=discover_new: keyword | best_sellers_url | category_url | location | |
include_errors | 布尔 | 可选 | include a per-input error report in the snapshot | |
limit_per_input | 整数 | 可选 | cap records produced per input row — the main guard on discovery spend | 10 |
custom_output_fields | 字符串 | 可选 | pipe-separated field list | |
uncompressed_webhook | 布尔 | 可选 | ||
limit_multiple_results | 整数 | 可选 | cap total records across the whole job | |
- 查询参数
type字符串可选set to discover_new to run a discovery crawl instead of scraping the given URLs
示例:
discover_newformat字符串可选json | ndjson | jsonl | csv
notify布尔可选fire a webhook when the job finishes
endpoint字符串可选webhook URL used when notify is set
dataset_id字符串必填which managed scraper to run
示例:
gd_l1vikfch901nx3by4auth_header字符串可选Authorization header value Bright Data should send to your webhook
discover_by字符串可选with type=discover_new: keyword | best_sellers_url | category_url | location
include_errors布尔可选include a per-input error report in the snapshot
limit_per_input整数可选cap records produced per input row — the main guard on discovery spend
示例:
10custom_output_fields字符串可选pipe-separated field list
uncompressed_webhook布尔可选limit_multiple_results整数可选cap total records across the whole job
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X POST 'https://toolswitch.dev/v1/tools/brightdata.web.scrape.job.start?dataset_id=gd_l1vikfch901nx3by4' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '[{"url":"https://www.instagram.com/instagram"}]'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/brightdata.web.scrape.job.start?dataset_id=gd_l1vikfch901nx3by4",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("[{\"url\":\"https://www.instagram.com/instagram\"}]"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/brightdata.web.scrape.job.start?dataset_id=gd_l1vikfch901nx3by4", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("[{\"url\":\"https://www.instagram.com/instagram\"}]")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.0015/result 计费,已含服务费。