Batch Scrape
Batch Scrape 用于一次提交多个 URL,异步执行后返回一个 job id。
Endpoint
Section titled “Endpoint”POST https://api.firecrawl.dev/v2/batch/scrape
请求字段(Body)
Section titled “请求字段(Body)”| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
urls | string[] (uri) | 是 | 需要批量抓取的 URL 列表 |
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
maxConcurrency | number | - | 该批任务的最大并发数;不填则使用团队并发限制 |
ignoreInvalidURLs | boolean | true | 忽略无效 URL,不让整批失败;无效项会出现在响应的 invalidURLs |
webhook | object | - | Webhook 配置(可选) |
除 urls/maxConcurrency/ignoreInvalidURLs/webhook 之外,Batch Scrape 还支持与 /v2/scrape 基本一致的参数(formats/onlyMainContent/includeTags/excludeTags/maxAge/minAge/headers/waitFor/mobile/timeout/parsers/actions/location/proxy/storeInCache/zeroDataRetention 等)。
建议参考:
| 字段 | 类型 | 说明 |
|---|---|---|
success | boolean | 是否成功创建批任务 |
id | string | 批任务 id |
url | string | 任务查询 URL |
invalidURLs | string[] | null | 当 ignoreInvalidURLs=true 时返回无效 URL 列表 |