跳转到主要内容
GET
/
crawl
/
{id}
获取爬取任务状态
curl --request GET \
  --url https://api.firecrawl.dev/v1/crawl/{id} \
  --header 'Authorization: Bearer <token>'
{
  "status": "<string>",
  "total": 123,
  "completed": 123,
  "creditsUsed": 123,
  "expiresAt": "2023-11-07T05:31:56Z",
  "next": "<string>",
  "data": [
    {
      "markdown": "<string>",
      "html": "<string>",
      "rawHtml": "<string>",
      "links": [
        "<string>"
      ],
      "screenshot": "<string>",
      "metadata": {
        "title": "<string>",
        "description": "<string>",
        "language": "<string>",
        "sourceURL": "<string>",
        "keywords": "<string>",
        "ogLocaleAlternate": [
          "<string>"
        ],
        "<any other metadata> ": "<string>",
        "statusCode": 123,
        "error": "<string>"
      }
    }
  ]
}
注意:此 API 的全新 v2 版本 现已推出,功能和性能均有所提升。

授权

Authorization
string
header
必填

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

路径参数

id
string<uuid>
必填

抓取任务 ID

响应

成功的响应

status
string

当前爬取任务的状态。可能为 scrapingcompletedfailed 之一。

total
integer

尝试爬取的页面总数。

completed
integer

成功爬取的页面数量。

creditsUsed
integer

本次爬取所消耗的额度数。

expiresAt
string<date-time>

抓取任务到期的日期和时间。

next
string | null

用于获取后续 10MB 数据的 URL。如果抓取尚未完成或响应大小超过 10MB,则会返回该字段。

data
object[]

爬取数据。