> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-capy-docs-factual-copy-fixes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# エージェントのステータスを取得

> Firecrawl APIキーが必要なAIエージェントの方は、自動オンボーディング手順について [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) を参照してください。


## OpenAPI

````yaml ja/api-reference/v2-openapi.json GET /agent/{jobId}
openapi: 3.0.0
info:
  contact:
    email: support@firecrawl.dev
    name: Firecrawl Support
    url: https://firecrawl.dev/support
  description: Firecrawlのサービスを利用して、Webスクレイピングやクロールを行うためのAPIです。
  title: Firecrawl API
  version: v2
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /agent/{jobId}:
    parameters:
      - description: エージェントジョブのID
        in: path
        name: jobId
        required: true
        schema:
          format: uuid
          type: string
    get:
      tags:
        - Agent
      summary: エージェントジョブのステータスを取得
      operationId: getAgentStatus
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  creditsUsed:
                    type: number
                  data:
                    description: >-
                      抽出されたデータ（ステータスが completed
                      の場合にのみ存在）。クレジット上限で停止した場合を含め、失敗した実行では設定されません。
                    type: object
                  effort:
                    description: エージェント実行で使用される推論予算（effort を設定した実行でのみ存在）
                    enum:
                      - low
                      - medium
                      - high
                    type: string
                  error:
                    description: エラーメッセージ（status が failed の場合にのみ含まれます）
                    type: string
                  exchange:
                    $ref: '#/components/schemas/AgentExchangeSummary'
                  expiresAt:
                    format: date-time
                    type: string
                  message:
                    description: >-
                      結果に関する Agent からの補足。`chat`
                      モードでは、新しいデータを求めない追加リクエストへの回答は、`data`
                      ではなくここに返されます。クレジット上限に達して実行が停止し、失敗した場合は、どの部分が未完了かが説明されることがあります。
                    type: string
                  mode:
                    enum:
                      - extract
                      - chat
                    type: string
                  model:
                    default: spark-2
                    description: >-
                      エージェント実行時に使用されたモデルプリセット。新しいすべての実行は spark-2 で実行されます。Spark 1
                      の名前はレガシー実行にのみ表示されます。
                    enum:
                      - spark-2
                      - spark-1-pro
                      - spark-1-mini
                    type: string
                  partial:
                    description: >-
                      未完了の実行から可能な範囲で復元された JSON。`maxCredits`
                      に達した場合など、一部の失敗した実行でのみ存在し、処理中の実行では存在しません。行やフィールドが欠落している可能性があるため、完了した結果として扱わないでください。
                  partialSchemaValid:
                    description: >-
                      `partial` がリクエストの JSON スキーマに適合するかどうか。`partial` が存在し、リクエストに
                      `schema` が含まれている場合にのみ存在します。
                    type: boolean
                  pendingApproval:
                    $ref: '#/components/schemas/AgentPendingApproval'
                  status:
                    enum:
                      - processing
                      - completed
                      - failed
                    type: string
                  stopReason:
                    description: >-
                      失敗した実行が途中で停止した理由。`credit_limit_reached` は、実行が `maxCredits`
                      の上限に達したことを意味します。ステータスが failed の場合にのみ存在します。
                    enum:
                      - credit_limit_reached
                    type: string
                  success:
                    type: boolean
                  suggestions:
                    description: スレッドの次のターンに向けて Agent が提案する追加リクエスト。
                    items:
                      properties:
                        label:
                          type: string
                        prompt:
                          type: string
                      type: object
                    type: array
                  threadId:
                    description: この実行が属するスレッド。
                    format: uuid
                    type: string
                  threadTurn:
                    description: スレッド内でのこの実行のターン番号。1 から始まります。
                    type: integer
                type: object
          description: 成功時のレスポンス
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Invalid job ID format. Job ID must be a valid UUID.
                    type: string
                type: object
          description: 不正なリクエスト — ジョブ ID が有効な UUID ではありません。
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    example: Agent job not found
                    type: string
                type: object
          description: エージェントジョブが見つかりません
      security:
        - bearerAuth: []
components:
  schemas:
    AgentExchangeSummary:
      description: >-
        この実行で Alexandria を使って行った内容。`toolkits` と `requireApproval`
        は、スレッドからの継承を反映して確定した値です。
      properties:
        creditsUsed:
          description: プロバイダー呼び出しで消費したクレジット数。不明な場合は null。
          nullable: true
          type: number
        enabled:
          type: boolean
        onTermsRequired:
          enum:
            - skip
            - ask
          type: string
        paidCalls:
          description: この実行で行った有料のプロバイダー呼び出し。
          type: integer
        requireApproval:
          type: boolean
        requiresAction:
          description: >-
            `onTermsRequired: "ask"`
            で、規約への同意要求によってターンが終了した場合にのみ提供される、各プロバイダーの規約を表示し、同意するための呼び出し。これらの呼び出しは自動実行されません。`terms/accept`
            は、ユーザーが明示的に同意した後にのみ呼び出してください。
          properties:
            approvalId:
              description: 規約への同意後に回答する、`terms` の `pendingApproval`。
              type: string
            providers:
              items:
                properties:
                  accept:
                    description: >-
                      `/v2/scrape` の `alexandria` で使用する、`{ provider, capability,
                      options }` 形式の `terms/accept` 呼び出し。
                    type: object
                  adds:
                    type: string
                  capability:
                    type: string
                  digest:
                    description: カタログでダイジェストが公開されていない場合は null。`terms/show` で取得できます。
                    nullable: true
                    type: string
                  name:
                    type: string
                  provider:
                    type: string
                  show:
                    description: >-
                      `/v2/scrape` の `alexandria` で使用する、`{ provider, capability,
                      options }` 形式の `terms/show` 呼び出し。
                    type: object
                  url:
                    type: string
                  version:
                    type: string
                type: object
              type: array
            type:
              enum:
                - accept_terms
              type: string
          type: object
        skippedProviders:
          description: >-
            役立つ可能性があったものの、Team がまだ同意していないデータ利用規約への同意が必要なプロバイダー。すべての
            `onTermsRequired` モードが対象です。
          items:
            properties:
              adds:
                description: プロバイダーが追加で提供できたはずの内容。
                type: string
              capability:
                type: string
              name:
                type: string
              provider:
                type: string
              reason:
                enum:
                  - terms_required
                type: string
              termsUrl:
                description: ユーザーがダッシュボードで規約に同意する場所。
                type: string
              version:
                description: 規約のバージョン。
                type: string
            type: object
          type: array
        toolkits:
          description: 固定されたプロバイダー。空または未指定の場合は、Team が使用できるすべてのプロバイダーを意味します。
          items:
            type: string
          type: array
      type: object
    AgentPendingApproval:
      description: >-
        ターンを停止して確認を求めた内容。スレッドの次のターンで `exchange.approve` または `exchange.decline`
        を使って回答します。
      properties:
        calls:
          description: 承認待ちの有料呼び出し。`terms` の承認では空です。
          items:
            properties:
              capability:
                type: string
              creditsEstimate:
                description: 推定クレジット数。不明な場合は null。
                nullable: true
                type: number
              id:
                description: 一部の呼び出しだけを承認するには、`exchange.approve.callIds` に渡します。
                type: string
              input:
                description: 呼び出しの実行時に使用するオプション。
                type: object
              more:
                description: 同じ呼び出しの実行時に使用する追加の入力。
                items:
                  type: object
                type: array
              provider:
                type: string
            type: object
          type: array
        id:
          description: これを `approvalId` として送信します。
          type: string
        kind:
          description: >-
            `calls`: `requireApproval` によって保留された有料のプロバイダー呼び出し。`terms`:
            データ利用規約への同意が必要なプロバイダー（`onTermsRequired:
            "ask"`）。規約への同意要求が導入される前に作成された項目にはこの値がなく、それらは `calls` として扱われます。
          enum:
            - calls
            - terms
          type: string
        reason:
          description: Agentがこれらの呼び出しを行おうとする理由。
          type: string
        resolution:
          description: 後続のターンで承認要求に回答するまでは null。
          nullable: true
          properties:
            always:
              type: boolean
            approved:
              type: boolean
            byRunId:
              type: string
            callIds:
              items:
                type: string
              type: array
          type: object
        terms:
          description: '`terms` の承認の場合、規約への同意が必要なプロバイダー。'
          items:
            properties:
              adds:
                description: プロバイダーが追加で提供する内容。
                type: string
              capability:
                type: string
              digest:
                description: カタログでダイジェストが公開されていない場合は null。`terms/show` で取得できます。
                nullable: true
                type: string
              name:
                type: string
              provider:
                type: string
              url:
                description: ユーザーがダッシュボードで規約に同意する場所。
                type: string
              version:
                description: 規約のバージョン。
                type: string
            type: object
          type: array
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.