> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-noaa-mar-989-create-firecrawl-codex-plugins.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 質問

`/support/ask` エンドポイントは、Firecrawl のジョブ、アカウント、API 利用に関する問題を診断する AI サポートエージェントです。質問を送信すると、すぐに対処に使える修正用パラメータを含む検証済みの回答が返されます。通常は 15～30 秒で返されます。

<div id="designed-for-ai-agents">
  ## AIエージェント向けに設計
</div>

`/support/ask` は、**エージェント間通信**向けに設計されています。Firecrawl を使う AI エージェントを構築している場合は、このエンドポイントをエラーハンドリングフローに組み込み、スクレイピングの失敗、クロールの問題、設定の不備を、人間の介入なしにエージェント自身で診断できるようにしてください。

`rationale` フィールドを渡して、エンドユーザーが何を達成しようとしているのかというコンテキストをサポートエージェントに伝えてください。これにより、情報収集の優先順位付けがしやすくなります。

<div id="how-it-works">
  ## 仕組み
</div>

1. **問題を説明します** — 問題の内容を自然言語で記述した質問です。
2. **エージェントが調査します** — ジョブ のログ、アカウントの状態、ドキュメント、ソースコードを確認します。
3. **エージェントが検証します** — 可能な場合、エージェントは実際の Firecrawl API に対して修正をテストします (例: 調整したパラメータでスクレイピングを再試行する) 。
4. **検証済みの回答を受け取れます** — レスポンスには、文章による `answer`、そのまま適用できる機械可読な `fixParameters`、および修正がテストされたかどうかを示す `validation` の結果が含まれます。

<div id="authentication">
  ## 認証
</div>

Bearer トークンとして Firecrawl APIキーを使用します。リクエストは自動的に所属チームのスコープに制限されるため、参照できるのは自身のジョブとアカウントデータのみです。

```bash theme={null}
curl -X POST https://api.firecrawl.dev/v2/support/ask \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "my crawl returned 3 pages but I expected 50",
    "rationale": "user is on their third failed crawl attempt today"
  }'
```

<div id="response-fields">
  ## レスポンスフィールド
</div>

| フィールド           | 型       | 説明                        |                                                                       |
| --------------- | ------- | ------------------------- | --------------------------------------------------------------------- |
| `answer`        | string  | 診断内容と修正方法を説明する 2〜4 文の文章   |                                                                       |
| `confidence`    | string  | `high`、`medium`、または `low` |                                                                       |
| `fixParameters` | object  | null                      | 修正を適用するための API パラメータ (例: `{"waitFor": 5000}`)                         |
| `validation`    | object  | null                      | 修正がテストされたかどうか。`tested`、`result` (success/failure/skipped) 、`evidence` |
| `feedback`      | object  | null                      | エージェントが行き詰まった場合に含まれます。`{ blockedBy, attempted }`。成功時は null です。        |
| `durationMs`    | integer | 合計実行時間 (ミリ秒)              |                                                                       |

<div id="status-codes">
  ## ステータスコード
</div>

| コード   | 意味                               |
| ----- | -------------------------------- |
| `200` | 回答済み、または処理が停止中 (エンベロープは常に返されます)  |
| `400` | 無効なJSON、またはスキーマ違反                |
| `401` | Bearerトークンがない、または無効              |
| `504` | 60秒のハード制限に達した — 部分的なエンベロープが返されます |

連携例を含む機能ガイドについては、[Ask 機能のドキュメント](/ja/features/ask)を参照してください。

> 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 POST /support/ask
openapi: 3.0.0
info:
  title: Firecrawl API
  version: v2
  description: Firecrawlのサービスを利用して、Webスクレイピングやクロールを行うためのAPIです。
  contact:
    name: Firecrawl Support
    url: https://firecrawl.dev/support
    email: support@firecrawl.dev
servers:
  - url: https://api.firecrawl.dev/v2
security:
  - bearerAuth: []
paths:
  /support/ask:
    post:
      tags:
        - Support
      summary: AIサポートエージェントを使ってFirecrawlの問題を診断する
      operationId: supportAsk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - question
              properties:
                question:
                  type: string
                  minLength: 1
                  maxLength: 8000
                  description: 診断内容。発生している問題を説明してください。
                rationale:
                  type: string
                  minLength: 1
                  maxLength: 2000
                  description: AIによる呼び出し元に推奨。エンドユーザーが達成しようとしていることを1〜2文で記述してください。
                jobId:
                  type: string
                  description: >-
                    失敗した呼び出しに関連付けられた任意のFirecrawlジョブID。設定されている場合、debugJob、searchLogs、getJob
                    などのツールは自動的にこれを既定値として使用するため、エージェントが質問文から取得する必要はありません。
                context:
                  type: object
                  description: 呼び出し元エージェントから渡される自由形式のメタデータ。診断用プロンプトに文字列化されて含まれます。
      responses:
        '200':
          description: 診断が完了しました。エージェントが回答を見つけた場合でも、行き詰まった場合でも、envelope が返されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskResponse'
        '400':
          description: 無効なJSONまたはschema違反
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Bearerトークンがないか無効です
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '504':
          description: 60秒の固定制限時間に達しました。部分的なenvelopeが返される場合があります。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AskResponse:
      type: object
      properties:
        requestId:
          type: string
          description: このrequestの一意の識別子。
        answer:
          type: string
          description: 何が問題で、どう修正すべきかをまとめた2〜4文の説明文。
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
          description: 診断に対するエージェントの確信度。
        fixParameters:
          type: object
          nullable: true
          description: 推奨される修正を適用するための、機械で処理可能なAPIパラメータ。適用可能な修正がない場合はNullです。
        validation:
          type: object
          nullable: true
          description: エージェントが実際のFirecrawl APIに対して修正をテストしたかどうか。
          properties:
            tested:
              type: boolean
            result:
              type: string
              enum:
                - success
                - failure
                - skipped
            evidence:
              type: string
        feedback:
          type: object
          nullable: true
          description: エージェントが行き詰まり、有用な回答を生成できなかった場合に含まれます。成功時はNullです。
          properties:
            blockedBy:
              type: string
              description: エージェントが実行できなかったことの簡潔な説明。
            attempted:
              type: array
              items:
                type: string
              description: エージェントが断念する前に試したツール名。
        durationMs:
          type: integer
          description: 合計実行時間（ミリ秒）。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````