# 文档搜索 (/zh/api-reference/endpoint/docs-search)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1252 · updated: 2026-07-30 -->
Related: [Search（搜索）](/zh/api-reference/endpoint/search.md), [搜索反馈](/zh/api-reference/endpoint/search-feedback.md), [Scrape](/zh/api-reference/endpoint/scrape.md), [批量抓取](/zh/api-reference/endpoint/batch-scrape.md), [获取批量抓取状态](/zh/api-reference/endpoint/batch-scrape-get.md), [取消批量抓取](/zh/api-reference/endpoint/batch-scrape-delete.md)

`/support/docs-search` 端点使用 Firecrawl 的公开文档回答问题。需要你的 Firecrawl API 密钥。返回简洁、基于文档的答案，并附带相关文档页面的引用。

<div id="use-cases">
  ## 使用场景 [#使用场景]
</div>

* **AI 代理**，需要查阅 Firecrawl API 的使用方式、参数或最佳实践
* **支持机器人**，根据文档回答客户问题
* **开发者工具**，内嵌显示相关文档

<div id="example">
  ## 示例 [#示例]
</div>

```bash
curl -X POST https://api.firecrawl.dev/v2/support/docs-search \
  -H "Authorization: Bearer fc-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "what header carries the webhook signature, and how do I verify it?"
  }'
```

<div id="response">
  ### 响应 [#响应]
</div>

```json
{
  "requestId": "req_...",
  "answer": "The signature is sent in the X-Firecrawl-Signature header...",
  "evidence": [
    {
      "pathOrUrl": "webhooks/security.mdx#L1-L52",
      "reason": "Documents webhook signature verification"
    }
  ],
  "usage": { "inputTokens": 4356, "outputTokens": 688, "totalTokens": 5044 },
  "durationMs": 11252
}
```

<div id="response-fields">
  ## 响应字段 [#响应字段]
</div>

| 字段           | 类型      | 描述                                                    |
| ------------ | ------- | ----------------------------------------------------- |
| `answer`     | string  | 基于 Firecrawl 文档的简洁答案                                  |
| `evidence`   | array   | 引用的文档页面，包含 `pathOrUrl` 和 `reason`                     |
| `usage`      | object  | Token 用量 (`inputTokens`、`outputTokens`、`totalTokens`) |
| `durationMs` | integer | 总执行时间 (毫秒)                                            |

如需查看完整功能指南，请参见 [Ask 功能文档](/zh/features/ask)。

> 你是需要 Firecrawl API 密钥的 AI 代理吗？请参见 [firecrawl.dev/agent-onboarding/SKILL.md](https://www.firecrawl.dev/agent-onboarding/SKILL.md) 了解自动化接入说明。

`POST /support/docs-search`

使用公开文档语料库回答与 Firecrawl 文档相关的问题。

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "question": {
              "description": "需要解答的文档相关问题。",
              "type": "string"
            }
          },
          "required": [
            "question"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "answer": {
                "description": "基于 Firecrawl 文档的简明答案。",
                "type": "string"
              },
              "durationMs": {
                "description": "文档搜索的总执行时间（毫秒）。",
                "type": "integer"
              },
              "evidence": {
                "items": {
                  "properties": {
                    "pathOrUrl": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array"
              },
              "requestId": {
                "type": "string"
              },
              "usage": {
                "properties": {
                  "inputTokens": {
                    "type": "integer"
                  },
                  "outputTokens": {
                    "type": "integer"
                  },
                  "totalTokens": {
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        }
      },
      "description": "基于文档的答案"
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "description": "支持代理或上游返回的错误代码。",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      "description": "请求无效"
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "description": "支持代理或上游返回的错误代码。",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      "description": "Bearer token 缺失或无效"
    },
    "503": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "description": "支持代理或上游返回的错误代码。",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      "description": "支持代理不可用"
    },
    "504": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "error": {
                "description": "支持代理或上游返回的错误代码。",
                "type": "string"
              }
            },
            "type": "object"
          }
        }
      },
      "description": "支持代理超时"
    }
  }
}
```
