跳转到主要内容
POST
/
support
/
docs-search
使用 AI 搜索 Firecrawl 文档
curl --request POST \
  --url https://api.firecrawl.dev/v2/support/docs-search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "question": "<string>"
}
'
{
  "requestId": "<string>",
  "answer": "<string>",
  "evidence": [
    {
      "pathOrUrl": "<string>",
      "reason": "<string>"
    }
  ],
  "usage": {
    "inputTokens": 123,
    "outputTokens": 123,
    "totalTokens": 123
  },
  "durationMs": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.firecrawl.dev/llms.txt

Use this file to discover all available pages before exploring further.

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

使用场景

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

示例

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

响应

{
  "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
}

响应字段

字段类型描述
answerstring基于 Firecrawl 文档的简洁答案
evidencearray引用的文档页面,包含 pathOrUrlreason
usageobjectToken 用量 (inputTokensoutputTokenstotalTokens)
durationMsinteger总执行时间 (毫秒)
如需查看完整功能指南,请参见 Ask 功能文档
你是需要 Firecrawl API 密钥的 AI 代理吗?请参见 firecrawl.dev/agent-onboarding/SKILL.md 了解自动化接入说明。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
question
string
必填

需要根据 Firecrawl 公开文档回答的问题。

Required string length: 1 - 8000

响应

已成功返回基于文档的答案。

requestId
string

此请求的唯一标识符。

answer
string

基于 Firecrawl 公开文档的简明答案。

evidence
object[]

答案中引用的文档页面。

usage
object
durationMs
integer

总执行时间(毫秒)。