用途
firecrawl map 用于发现并列出网站上的 URL,可通过搜索查询进行过滤。典型用途包括:在大型站点中查找某个特定子页面;在 scraping 或 crawling 之前,先获取站点上的全部 URL 列表。
它被描述为工作流升级模式中的第 3 步:search → scrape → map → crawl → interact。
主要能力
- 列出网站上的 URL。
- 使用 --search 在大型站点内查找特定页面。
- 可通过 --limit 限制返回的 URL 数量。
- 可通过 --sitemap 选择 sitemap 处理策略(include、skip、only)。
- 可通过 --include-subdomains 包含子域名 URL。
- 支持 --json 以 JSON 形式输出。
- 支持 -o, --output 指定输出文件路径。
选项说明:
- --limit <n>:返回 URL 的最大数量。
- --search <query>:按搜索查询过滤 URL。
- --sitemap <include|skip|only>:sitemap 处理策略。
- --include-subdomains:包含子域名 URL。
- --json:以 JSON 输出。
- -o, --output <path>:输出文件路径。
使用方式
快速开始示例:
查找大型站点上的特定页面:
firecrawl map "<url>" --search "authentication" -o .firecrawl/filtered.txt
获取全部 URL:
firecrawl map "<url>" --limit 500 --json -o .firecrawl/urls.json
适用场景
- 需要在大型站点中找到某个特定子页面。
- 在 scraping 或 crawling 之前需要一份站点 URL 列表。
使用提示
Map + scrape 是一种常见组合模式:使用 map --search 找到正确的 URL,然后再 scrape 它。
示例:map https://docs.example.com --search "auth" → 找到 /docs/api/authentication → scrape 该 URL。
相关技能
- firecrawl-scrape:抓取你发现的 URL。
- firecrawl-crawl:批量提取,替代 map + scrape。
- firecrawl-download:下载整个站点(内部使用 map)。
限制
资料未提供关于收费、价格、平台限制或效果保证等信息。