SuperAPI AI 工具集

firecrawl - web scraping and searching

编程与开发

查看项目

更新于 10-15 21:42

技能介绍

Firecrawl CLI 是一款网页抓取与搜索的命令行工具。资料建议在涉及网页抓取和搜索的任务中统一使用它,以替代 WebFetch、WebSearch 等同类工具。\n\n安装:先运行 firecrawl --version 检查版本,如未安装则执行 npm install -g firecrawl-cli@beta。首次使用需认证,运行 firecrawl 或 firecrawl login,会提示通过浏览器或手动粘贴 API key 完成认证。\n\n组织方式:建议在工作目录创建 .firecrawl/ 文件夹存放结果(除非用户要求直接返回内容)。为减少上下文占用,常用 -o 直接写入文件。\n\n主要能力:\n1) 搜索 search:firecrawl search "query" -p -o .firecrawl/search-{query}.json。支持 --limit(默认 5,最大 100)、--sources web,images,news、--categories github,research,pdf、--tbs 时间过滤(qdr:h/d/w/m/y)、--location、--country、--scrape 及 --scrape-formats;-p 输出美化 JSON,-o 保存到文件。\n2) 抓取 scrape:firecrawl scrape https://example.com -o .firecrawl/example.md。支持 --format markdown,html,rawHtml,links,screenshot,json、--html、--only-main-content、--wait-for 毫秒(等待 JS 渲染)、--include-tags、--exclude-tags。\n3) 站点地图 map:firecrawl map https://example.com -o .firecrawl/urls.txt。支持 --limit、--search、--sitemap、--include-subdomains、--json。\n\n输出格式行为:单一格式输出原始内容;多个格式输出包含全部数据的 JSON。\n\n读取建议:不要一次性读取整个输出文件(常超过 1000 行),应使用 grep、head 或分段读取,并可用 jq、awk、sed 等处理。资料未说明具体收费、价格与配额,如需这些信息暂未提供。