> ## Documentation Index
> Fetch the complete documentation index at: https://firecrawl-fix-js-response-syntax-highlighting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FIRE-1 代理（测试版）

> 支持在网页上进行智能导航与交互的 AI 代理

FIRE-1 是一款可增强 Firecrawl 抓取能力的 AI 代理。它能够控制浏览器 actions 并在复杂的网站结构中进行导航，从而实现超越传统抓取方式的全面数据提取。

<div id="what-fire-1-can-do">
  ### FIRE-1 能做什么：
</div>

* 规划并执行 actions 来获取数据
* 与按钮、链接、输入框和动态元素交互。
* 获取需要分页、多步操作等的多页数据。

<div id="how-to-use-fire-1">
  ## 如何使用 FIRE-1
</div>

对于需要跨多个页面导航或与页面元素交互的复杂抽取任务，你可以在 `/v1/extract` 端点上使用 FIRE-1 代理。

**示例：**

<CodeGroup>
  <ExtractFire1Python />

  ```js Node theme={null}
  import { Firecrawl, ExtractResponse } from 'firecrawl';

  const app = new Firecrawl({apiKey: "fc-YOUR_API_KEY"});

  // 使用 schema 和提示词从网站提取：
  const extractResult = await app.extract(['https://example-forum.com/topic/123'], {
    prompt: "Extract all user comments from this forum thread.",
    schema: {
      type: "object",
      properties: {
        comments: {
          type: "array",
          items: {
            type: "object",
            properties: {
              author: {type: "string"},
              comment_text: {type: "string"}
            },
            required: ["author", "comment_text"]
          }
        }
      },
      required: ["comments"]
    },
    agent: {
      model: 'FIRE-1'
    }
  }) as ExtractResponse;

  if (!extractResult.success) {
    throw new Error(`Failed to extract: ${extractResult.error}`)
  }

  console.log(extractResult)
  ```

  ```bash curl theme={null}
  curl -X POST https://api.firecrawl.dev/v1/extract \
      -H 'Content-Type: application/json' \
      -H 'Authorization: Bearer YOUR_API_KEY' \
      -d '{
        "urls": ["https://example-forum.com/topic/123"],
        "prompt": "提取该论坛帖子的所有用户评论。",
        "schema": {
          "type": "object",
          "properties": {
            "comments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "author": {"type": "string"},
                  "comment_text": {"type": "string"}
                },
                "required": ["author", "comment_text"]
              }
            }
          },
          "required": ["comments"]
        },
        "agent": {
          "model": "FIRE-1"
        }
      }'
  ```
</CodeGroup>

<div id="billing">
  ## 计费
</div>

使用 FIRE-1 的成本不可预估。请查看我们的[积分计算器](https://www.firecrawl.dev/extract-calculator)以了解每个 Extract 请求的基础费用。

**为什么 FIRE-1 更贵？**\
FIRE-1 通过高级浏览器自动化与 AI 规划来与复杂网页交互，相较于标准提取，这需要更多的计算资源。

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

* `/extract`：每分钟请求 10 次
