> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 轮询爬取任务

> 按 jobId 取回 post_firecrawl_crawl 提交的爬取任务。

按 `jobId` 取回 [`post_firecrawl_crawl`](/docs/zh/api-reference/search/post_firecrawl-crawl) 提交的爬取任务。返回和提交时相同的信封 —— `id`、`status`、`createdAt`、`completedAt`、`pricing`、`output`、`error`。反复轮询直到 `status` 为 `completed`、`failed` 或 `cancelled`；成功时 `output` 是页面数组，每项含 `markdown` 和 `metadata`。轮询本身又快又便宜，实测不到 1 秒。它只读取任务，不能发起任务。


## OpenAPI

````yaml openapi/zh/firecrawl.json GET /firecrawl/crawl/{jobId}
openapi: 3.0.0
info:
  title: Firecrawl API
  version: 1.0.0
  description: >-
    Firecrawl 各 endpoint 的统一 API 文档，包括 Scrape、Search、Map、Parse、Crawl 和 Batch
    Scrape。Scrape、Search、Map 和 Parse 是同步接口。Crawl 和 Batch Scrape
    是异步接口：调用方提交任务，然后轮询返回的任务资源以获取状态和结果。


    计费按消耗的 Firecrawl credit 计量，而不是按请求固定收费，因此总费用随任务产生的页面、链接或结果数量增长。大致 credit
    消耗：Scrape = 每页 1 credit，Map = 每页 1 credit，Search = 每 10 条结果约 2 credits，Crawl
    = 每页 1 credit，Batch Scrape = 每页 1 credit。每个 credit 对应的美元费率取决于你的等级（normal
    $0.005，vip $0.004，svip $0.0034）。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - bearerAuth: []
paths:
  /firecrawl/crawl/{jobId}:
    get:
      tags:
        - https://docs.firecrawl.dev/api-reference/endpoint/crawl
      summary: 轮询抓取任务。
      description: >-
        按 `jobId` 取回 `post_firecrawl_crawl` 提交的爬取任务。返回和提交时相同的信封 ——
        `id`、`status`、`createdAt`、`completedAt`、`pricing`、`output`、`error`。反复轮询直到
        `status` 为 `completed`、`failed` 或 `cancelled`；成功时 `output` 是页面数组，每项含
        `markdown` 和 `metadata`。轮询本身又快又便宜，实测不到 1 秒。它只读取任务，不能发起任务。
      operationId: get_firecrawl_crawl_job
      parameters:
        - in: path
          name: jobId
          required: true
          schema:
            type: string
          description: 提交调用返回的任务 id。
      responses:
        '200':
          description: 该抓取任务的当前状态。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncJob'
components:
  schemas:
    AsyncJob:
      type: object
      description: >-
        一个异步集成任务。由提交调用（HTTP 202）以及轮询/详情调用返回。请按 id 轮询该任务，直到 status
        进入终态（completed、failed 或 cancelled）。
      properties:
        id:
          type: string
          description: 唯一的 AIsa 任务标识符。可用它轮询、列出或取消该任务。
          example: iaj_01HZY8Q2M4K7N9V3T6W1X0B2C3
        object:
          type: string
          description: 始终为 "integration_async_job"。
          example: integration_async_job
        endpoint:
          type: string
          description: 该任务所属的提交 endpoint。
          example: /apis/v1/firecrawl/crawl
        status:
          type: string
          enum:
            - queued
            - running
            - completed
            - failed
            - cancelled
          description: 面向用户的生命周期状态。queued 和 running 为非终态；completed、failed 和 cancelled 为终态。
        createdAt:
          type: string
          format: date-time
          description: 任务被受理的时间。
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: 任务进入终态的时间。任务仍处于排队或运行中时为 null。
        pricing:
          type: object
          properties:
            currency:
              type: string
              example: USD
            authorizedMicrosUSD:
              type: integer
              description: 任务被受理时授权（冻结）的金额，单位为微美元。计量型任务最终按实际消耗的 credits 结算。
            finalMicrosUSD:
              type: integer
              nullable: true
              description: 任务进入终态后的最终结算金额，单位为微美元。结算前为 null。
            billingMode:
              type: string
              description: 该任务的计费模式。
              example: metered_result
        output:
          description: >-
            任务结果载荷。仅在 status 为 completed 后出现。对 crawl 而言是抓取到的页面数组；对 batch scrape
            而言是抓取到的文档数组。
          nullable: true
        outputExpired:
          type: boolean
          description: 当结果已超过留存窗口、不再可获取时为 true。
        error:
          type: object
          nullable: true
          description: 当 status 为 failed 时出现，否则为 null。
          properties:
            code:
              type: string
              description: 机器可读的错误码。
            message:
              type: string
              description: 人类可读的错误信息。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````