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

# Camel AI

> Firecrawl 与 Camel AI 集成，用作数据加载器。

<Note>
  **CAMEL 官方文档：** [docs.camel-ai.org/key\_modules/loaders](https://docs.camel-ai.org/key_modules/loaders)

  Firecrawl 以 CAMEL 加载器的形式提供，可将任何网站转换为供您的代理使用、适配 LLM 的 Markdown
</Note>

<div id="installation">
  ## 安装
</div>

```bash theme={null}
pip install camel-ai
```

设置 Firecrawl key，以便加载器自动读取：

```bash theme={null}
export FIRECRAWL_API_KEY="fc-your-api-key"
```

<div id="usage">
  ## 使用方法
</div>

借助 Camel AI 和 Firecrawl，你可以快速构建利用网页数据的多智能体系统。

<div id="using-firecrawl-to-gather-an-entire-website">
  ### 使用 Firecrawl 获取整个网站
</div>

`crawl` 会在任务完成后返回。检查 `status`，然后从 `data` 中读取 Markdown。

```python theme={null}
from camel.loaders import Firecrawl

firecrawl = Firecrawl()

response = firecrawl.crawl(url="https://www.camel-ai.org/about")
print(response["status"])  # 爬取完成后为 "completed"

print(response["data"][0]["markdown"])
```

<div id="using-firecrawl-to-gather-a-single-page">
  ### 使用 Firecrawl 获取单个网页
</div>

```python theme={null}
from camel.loaders import Firecrawl

firecrawl = Firecrawl()

response = firecrawl.scrape(url="https://www.camel-ai.org/about")
print(response["markdown"])
```

<Tip>
  `Firecrawl()` 会从环境变量中读取 `FIRECRAWL_API_KEY`。传入 `api_key=...` 可覆盖该设置，或传入 `api_url=...` 以指向 [self-hosted](/zh/contributing/self-host) 实例。
</Tip>

<div id="resources">
  ## 资源
</div>

* [CAMEL 加载器文档](https://docs.camel-ai.org/key_modules/loaders)
* [CAMEL 与 Firecrawl 使用指南](https://www.camel-ai.org/blogs/firecrawl)
* [Firecrawl 抓取](/zh/features/scrape)和[爬取](/zh/features/crawl)文档
