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

# 简介

> Firecrawl API 参考（v2）

<Note>
  \*\*对于 AI 代理：\*\*使用 [llms.txt](/zh/llms.txt) 查看所有文档的完整索引。
</Note>

Firecrawl API 为你提供以编程方式访问 Web 数据的能力。所有端点共享同一个基础 URL、身份验证机制和响应格式，详见本页。

<div id="features">
  ## 功能
</div>

<CardGroup cols={3}>
  <Card title="Scrape" icon="markdown" href="/zh/api-reference/endpoint/scrape" color="FF713C">
    以 markdown 或 json 格式从任意网页提取内容。
  </Card>

  <Card title="Parse" icon="markdown" href="/zh/api-reference/endpoint/parse" color="FF713C">
    上传文件并将其解析为 markdown 或其他格式。
  </Card>

  <Card title="Crawl" icon="spider" href="/zh/api-reference/endpoint/crawl-post" color="FF713C">
    爬取整个网站，并获取所有页面的内容。
  </Card>

  <Card title="Map" icon="map" href="/zh/api-reference/endpoint/map" color="FF713C">
    快速、可靠地获取任意网站的完整 URL 列表。
  </Card>

  <Card title="Search" icon="magnifying-glass" href="/zh/api-reference/endpoint/search" color="FF713C">
    搜索全网，并以任意格式获取完整页面内容。
  </Card>
</CardGroup>

<div id="agentic-features">
  ## Agent 功能
</div>

<CardGroup cols={3}>
  <Card title="Agent" icon="robot" href="/zh/api-reference/endpoint/agent" color="FF713C">
    由 AI 驱动的自主网页数据采集。
  </Card>

  <Card title="Browser" icon="browser" href="/zh/api-reference/endpoint/browser-create" color="FF713C">
    创建并控制浏览器会话，以执行交互式 Web 任务。
  </Card>
</CardGroup>

<div id="base-url">
  ## 基础 URL
</div>

所有请求都使用以下基础 URL：

```bash theme={null}
https://api.firecrawl.dev
```

<div id="authentication">
  ## 身份验证
</div>

每个请求必须在 `Authorization` 请求头中包含 API 密钥：

```bash theme={null}
Authorization: Bearer fc-YOUR-API-KEY
```

在所有 API 调用中都要包含这个请求头。你可以在 [Firecrawl 控制台](https://www.firecrawl.dev/app/api-keys) 中找到你的 API 密钥。

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.firecrawl.dev/v2/scrape" \
    -H "Authorization: Bearer fc-YOUR-API-KEY" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://example.com"}'
  ```

  ```python Python theme={null}
  from firecrawl import Firecrawl

  firecrawl = Firecrawl(api_key="fc-YOUR-API-KEY")

  result = firecrawl.scrape("https://example.com")
  ```

  ```js Node theme={null}
  import Firecrawl from '@mendable/firecrawl-js';

  const firecrawl = new Firecrawl({ apiKey: "fc-YOUR-API-KEY" });

  const result = await firecrawl.scrape('https://example.com');
  ```
</CodeGroup>

<div id="response-codes">
  ## 响应代码
</div>

Firecrawl 使用标准的 HTTP 状态码来指示请求的结果。`2xx` 范围内的代码表示成功，`4xx` 代码表示客户端错误，`5xx` 代码表示服务器错误。

请参见[错误](/zh/api-reference/errors)了解完整参考，其中包括每种失败模式返回的 `error` 字符串、重试指导以及可直接复制粘贴的 backoff 代码片段。

<div id="rate-limit">
  ## 速率限制
</div>

Firecrawl API 会对所有端点实施速率限制，以确保服务稳定。速率限制是基于特定时间窗口内的请求数量设定的。

当你超过速率限制时，API 会返回 `429` 状态码。请在短暂延迟后再重试该请求。
