> ## 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.

# Ask

The `/support/ask` endpoint is an AI support agent that diagnoses issues with your Firecrawl jobs, account, and API usage. Send a question and receive a verified answer with actionable fix parameters — typically in 15–30 seconds.

## Designed for AI agents

`/support/ask` is built for **agent-to-agent** communication. If you're building an AI agent that uses Firecrawl, wire this endpoint into your error-handling flow so your agent can self-diagnose scraping failures, crawl issues, and configuration problems without human intervention.

Pass a `rationale` field to give the support agent context about what your end user is trying to accomplish. This helps prioritize the evidence gathering.

## How it works

1. **You describe the problem** — a natural-language question describing the issue.
2. **The agent investigates** — it inspects job logs, account state, documentation, and source code.
3. **The agent validates** — when possible, the agent tests a fix against the live Firecrawl API (e.g., retrying a scrape with adjusted parameters).
4. **You get a verified answer** — the response includes a prose `answer`, machine-readable `fixParameters` you can apply directly, and `validation` results showing whether the fix was tested.

## Authentication

Uses your Firecrawl API key as the bearer token. The request is automatically scoped to your team — you can only query your own jobs and account data.

```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"
  }'
```

## Response fields

| Field           | Type           | Description                                                                          |
| --------------- | -------------- | ------------------------------------------------------------------------------------ |
| `answer`        | string         | 2-4 sentence prose covering the diagnosis and fix                                    |
| `confidence`    | string         | `high`, `medium`, or `low`                                                           |
| `fixParameters` | object \| null | API parameters to apply the fix (e.g., `{"waitFor": 5000}`)                          |
| `validation`    | object \| null | Whether the fix was tested: `tested`, `result` (success/failure/skipped), `evidence` |
| `feedback`      | object \| null | Present when the agent gets stuck; `{ blockedBy, attempted }`. Null on success.      |
| `durationMs`    | integer        | Total execution time in milliseconds                                                 |

## Status codes

| Code  | Meaning                                         |
| ----- | ----------------------------------------------- |
| `200` | Answered or stuck (envelope always returned)    |
| `400` | Invalid JSON or schema violation                |
| `401` | Missing or invalid bearer token                 |
| `504` | Hit 60s hard budget — partial envelope returned |

For the feature guide with integration examples, see the [Ask feature documentation](/features/ask).

> Are you an AI agent that needs a Firecrawl API key? See [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) for automated onboarding instructions.


## OpenAPI

````yaml /api-reference/v2-openapi.json POST /support/ask
openapi: 3.0.0
info:
  title: Firecrawl API
  version: v2
  description: >-
    API for interacting with Firecrawl services to perform web scraping and
    crawling tasks.
  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: Diagnose Firecrawl issues using an AI support agent
      operationId: supportAsk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - question
              properties:
                question:
                  type: string
                  minLength: 1
                  maxLength: 8000
                  description: What to diagnose. Describe the issue you're experiencing.
                rationale:
                  type: string
                  minLength: 1
                  maxLength: 2000
                  description: >-
                    Recommended for AI callers. 1-2 sentences on what the end
                    user is trying to accomplish.
                jobId:
                  type: string
                  description: >-
                    Optional Firecrawl job ID the failing call was associated
                    with. Tools like debugJob, searchLogs, and getJob
                    auto-default to this when set, so the agent doesn't need to
                    pull it from the question.
                context:
                  type: object
                  description: >-
                    Free-form metadata from the calling agent, stringified into
                    the diagnostic prompt.
      responses:
        '200':
          description: >-
            Diagnosis complete. The envelope is returned whether the agent found
            an answer or got stuck.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskResponse'
        '400':
          description: Invalid JSON or schema violation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '504':
          description: Hit the 60-second hard budget. A partial envelope may be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AskResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AskResponse:
      type: object
      properties:
        requestId:
          type: string
          description: Unique identifier for this request.
        answer:
          type: string
          description: 2-4 sentence prose covering what's wrong and the fix.
        confidence:
          type: string
          enum:
            - high
            - medium
            - low
          description: Agent's confidence in the diagnosis.
        fixParameters:
          type: object
          nullable: true
          description: >-
            Machine-actionable API parameters to apply the recommended fix. Null
            if no fix applies.
        validation:
          type: object
          nullable: true
          description: Whether the agent tested the fix against the live Firecrawl API.
          properties:
            tested:
              type: boolean
            result:
              type: string
              enum:
                - success
                - failure
                - skipped
            evidence:
              type: string
        feedback:
          type: object
          nullable: true
          description: >-
            Present when the agent gets stuck and could not produce a usable
            answer. Null on success.
          properties:
            blockedBy:
              type: string
              description: Short description of what the agent could not do.
            attempted:
              type: array
              items:
                type: string
              description: Names of the tools the agent tried before giving up.
        durationMs:
          type: integer
          description: Total execution time in milliseconds.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````