用途
firecrawl-download 是一个实验性的便捷命令,将 map(发现页面)与 scrape(抓取页面)组合在一起,用于把整个网站保存为本地文件。它先映射站点以发现页面,然后逐页抓取,并保存到 .firecrawl/ 下的嵌套目录中。
主要能力
- 将整个站点(或某个区段)保存为本地文件
- 支持离线访问文档或内容
- 批量内容提取,并生成有组织的文件结构
- 支持 markdown、截图或每页多种格式输出
- 所有 scrape 选项均可与 download 配合使用
使用方式
快速开始(交互式向导,会为你选择格式、截图和路径):
firecrawl download https://docs.example.com
带截图:
firecrawl download https://docs.example.com --screenshot --limit 20 -y
多种格式(每页每种格式各保存为独立文件):
firecrawl download https://docs.example.com --format markdown,links --screenshot --limit 20 -y
每页会生成:index.md + links.txt + screenshot.png
过滤到特定区段:
firecrawl download https://docs.example.com --include-paths "/features,/sdks"
跳过翻译版本:
firecrawl download https://docs.example.com --exclude-paths "/zh,/ja,/fr,/es,/pt-BR"
完整组合:
firecrawl download https://docs.example.com \
--include-paths "/features,/sdks" \
--exclude-paths "/zh,/ja" \
--only-main-content \
--screenshot \
-y
Download 选项
| 选项 | 说明 |
|---|---|
--limit <n> |
最多下载的页面数 |
--search <query> |
按搜索查询过滤 URL |
--include-paths <paths> |
仅下载匹配的路径 |
--exclude-paths <paths> |
跳过匹配的路径 |
--allow-subdomains |
包含子域名页面 |
-y |
跳过确认提示(自动化流程中始终使用) |
Scrape 选项(均可与 download 配合使用)
-f <formats>、-H、-S、--screenshot、--full-page-screenshot、--only-main-content、--include-tags、--exclude-tags、--wait-for、--max-age、--country、--languages
适用场景
- 想将整个站点(或某个区段)保存为本地文件
- 需要离线访问文档或内容
- 需要批量内容提取并生成有组织的文件结构
限制
该命令为实验性功能。资料中未提供其他限制、收费、价格或平台信息。
参见
- firecrawl-map — 仅发现 URL,不下载
- firecrawl-scrape — 抓取单个页面
- firecrawl-crawl — 批量提取为 JSON(非本地文件)