FIRE-1 能做什么:
- 规划并执行 actions 来获取数据
- 与按钮、链接、输入框和动态元素交互。
- 获取需要分页、多步操作等的多页数据。
如何使用 FIRE-1
/v1/extract 端点上使用 FIRE-1 代理。
示例:
计费
FIRE-1 通过高级浏览器自动化与 AI 规划来与复杂网页交互,相较于标准提取,这需要更多的计算资源。
速率限制
/extract:每分钟请求 10 次
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
支持在网页上进行智能导航与交互的 AI 代理
/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)
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"
}
}'
/extract:每分钟请求 10 次