Documentation Index
Fetch the complete documentation index at: https://firecrawl-mog-search-exclude-include-domains.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
FIRE-1 是一款可增强 Firecrawl 抓取能力的 AI 代理。它能够控制浏览器 actions 并在复杂的网站结构中进行导航,从而实现超越传统抓取方式的全面数据提取。
- 规划并执行 actions 来获取数据
- 与按钮、链接、输入框和动态元素交互。
- 获取需要分页、多步操作等的多页数据。
对于需要跨多个页面导航或与页面元素交互的复杂抽取任务,你可以在 /v1/extract 端点上使用 FIRE-1 代理。
示例:
import FirecrawlApp, { ExtractResponse } from '@mendable/firecrawl-js';
const app = new FirecrawlApp({apiKey: "fc-YOUR_API_KEY"});
// 使用 schema 和提示词从网站提取:
const extractResult = await app.extract(['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'
}
}) as ExtractResponse;
if (!extractResult.success) {
throw new Error(`提取失败:${extractResult.error}`)
}
console.log(extractResult)
使用 FIRE-1 的成本不可预估。请查看我们的积分计算器以了解每个 Extract 请求的基础费用。
为什么 FIRE-1 更贵?
FIRE-1 通过高级浏览器自动化与 AI 规划来与复杂网页交互,相较于标准提取,这需要更多的计算资源。