Skip to main content
POST
提交一个异步的批量抓取任务。
在单个异步任务中抓取多个 URL。提供一组 URL,批量任务在后台运行,你通过轮询获取状态和结果。 生命周期
  1. 提交 —— POST /apis/v1/firecrawl/batch-scrape,带上批量请求体和必填的 Idempotency-Key 请求头。成功后返回 202 Accepted、指向任务资源的 Location 响应头(/apis/v1/firecrawl/batch-scrape/{jobId}),以及一个 status 初始为 queued 的任务对象。
  2. 轮询 —— GET /apis/v1/firecrawl/batch-scrape/{jobId},重复直到 status 进入终态:completedfailedcancelled。当为 completed 时,抓取到的文档位于 output 中。
  3. 列表 —— GET /apis/v1/firecrawl/batch-scrape(可选 limitstatuscursor 查询参数)。
  4. 取消 —— POST /apis/v1/firecrawl/batch-scrape/{jobId}/cancel
每个 URL 都必须是唯一的 HTTPS URL 且不能是 PDF;单个任务可提交 1 到 1000 个 URL。计费按 Firecrawl credit 计量——每抓取一页消耗 1 credit——因此总费用随实际处理的页数增长。如果要从单个根地址沿链接遍历,而不是逐个列出 URL,请使用 post_firecrawl-crawl

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求头

Idempotency-Key
string
必填

使提交具备幂等性的唯一 key(1 到 191 字符)。使用相同 key 重复提交会返回原任务。

Maximum string length: 191

请求体

application/json
urls
string<uri>[]
必填

1 到 1000 个唯一的 HTTPS URL 用于抓取。不支持 PDF URL。

Required array length: 1 - 1000 elements
示例:
maxConcurrency
integer

并发抓取数的上限(1 到 20)。

必填范围: 1 <= x <= 20
onlyMainContent
boolean
默认值:true

只返回每个页面的正文内容。

includeTags
string[]

要保留的 HTML 标签/选择器。

Maximum array length: 50
Maximum string length: 128
excludeTags
string[]

要丢弃的 HTML 标签/选择器。

Maximum array length: 50
Maximum string length: 128
maxAge
integer

可接受的最大缓存时长,单位为毫秒。

必填范围: 0 <= x <= 31536000000
minAge
integer

重新抓取页面前所需的最小缓存时长,单位为毫秒。

必填范围: 0 <= x <= 31536000000
timeout
integer

单页超时时间,单位为毫秒。

必填范围: 1000 <= x <= 300000

响应

202 - application/json

批量抓取任务已受理。Location 响应头指向该任务资源;请轮询直到终态。

一个异步集成任务。由提交调用(HTTP 202)以及轮询/详情调用返回。请按 id 轮询该任务,直到 status 进入终态(completed、failed 或 cancelled)。

id
string

唯一的 AIsa 任务标识符。可用它轮询、列出或取消该任务。

示例:

"iaj_01HZY8Q2M4K7N9V3T6W1X0B2C3"

object
string

始终为 "integration_async_job"。

示例:

"integration_async_job"

endpoint
string

该任务所属的提交 endpoint。

示例:

"/apis/v1/firecrawl/crawl"

status
enum<string>

面向用户的生命周期状态。queued 和 running 为非终态;completed、failed 和 cancelled 为终态。

可用选项:
queued,
running,
completed,
failed,
cancelled
createdAt
string<date-time>

任务被受理的时间。

completedAt
string<date-time> | null

任务进入终态的时间。任务仍处于排队或运行中时为 null。

pricing
object
output
any | null

任务结果载荷。仅在 status 为 completed 后出现。对 crawl 而言是抓取到的页面数组;对 batch scrape 而言是抓取到的文档数组。

outputExpired
boolean

当结果已超过留存窗口、不再可获取时为 true。

error
object | null

当 status 为 failed 时出现,否则为 null。