firecrawl-agent
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefirecrawl agent
firecrawl agent
AI-powered autonomous extraction. The agent navigates sites and extracts structured data (takes 2-5 minutes).
由AI驱动的自主数据提取工具。该Agent可遍历网站并提取结构化数据(耗时2-5分钟)。
When to use
使用场景
- You need structured data from complex multi-page sites
- Manual scraping would require navigating many pages
- You want the AI to figure out where the data lives
- 你需要从复杂的多页面网站中获取结构化数据
- 手动抓取需要遍历大量页面
- 希望AI自动定位数据所在位置
Quick start
快速开始
bash
undefinedbash
undefinedExtract structured data
提取结构化数据
firecrawl agent "extract all pricing tiers" --wait -o .firecrawl/pricing.json
firecrawl agent "extract all pricing tiers" --wait -o .firecrawl/pricing.json
With a JSON schema for structured output
使用JSON schema生成结构化输出
firecrawl agent "extract products" --schema '{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number"}}}' --wait -o .firecrawl/products.json
firecrawl agent "extract products" --schema '{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number"}}}' --wait -o .firecrawl/products.json
Focus on specific pages
聚焦特定页面
firecrawl agent "get feature list" --urls "<url>" --wait -o .firecrawl/features.json
undefinedfirecrawl agent "get feature list" --urls "<url>" --wait -o .firecrawl/features.json
undefinedOptions
可选参数
| Option | Description |
|---|---|
| Starting URLs for the agent |
| Model to use: spark-1-mini or spark-1-pro |
| JSON schema for structured output |
| Path to JSON schema file |
| Credit limit for this agent run |
| Wait for agent to complete |
| Pretty print JSON output |
| Output file path |
| 参数选项 | 说明 |
|---|---|
| Agent的起始URL列表 |
| 使用的模型:spark-1-mini 或 spark-1-pro |
| 用于结构化输出的JSON schema |
| JSON schema文件的路径 |
| 本次Agent运行的信用额度上限 |
| 等待Agent完成任务 |
| 格式化输出JSON结果 |
| 输出文件路径 |
Tips
使用技巧
- Always use to get results inline. Without it, returns a job ID.
--wait - Use for predictable, structured output — otherwise the agent returns freeform data.
--schema - Agent runs consume more credits than simple scrapes. Use to cap spending.
--max-credits - For simple single-page extraction, prefer — it's faster and cheaper.
scrape
- 始终使用参数来实时获取结果。不使用该参数时,会返回任务ID。
--wait - 使用参数可获得可预测的结构化输出——否则Agent会返回自由格式的数据。
--schema - Agent运行消耗的信用额度比简单抓取更多。使用参数来控制成本。
--max-credits - 对于简单的单页面提取,建议使用功能——它更快且成本更低。
scrape
See also
相关链接
- firecrawl-scrape — simpler single-page extraction
- firecrawl-browser — manual browser automation (more control)
- firecrawl-crawl — bulk extraction without AI
- firecrawl-scrape —— 更简单的单页面提取工具
- firecrawl-browser —— 手动浏览器自动化(控制度更高)
- firecrawl-crawl —— 无AI参与的批量提取工具