firecrawl
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFirecrawl CLI
Firecrawl CLI
Web scraping, search, and browser automation CLI. Returns clean markdown optimized for LLM context windows.
Run or for full option details.
firecrawl --helpfirecrawl <command> --help网页抓取、搜索和浏览器自动化CLI,返回针对LLM上下文窗口优化的干净markdown内容。
运行或查看完整的选项说明。
firecrawl --helpfirecrawl <command> --helpPrerequisites
前置条件
Must be installed and authenticated. Check with .
firecrawl --status 🔥 firecrawl cli v1.8.0
● Authenticated via FIRECRAWL_API_KEY
Concurrency: 0/100 jobs (parallel scrape limit)
Credits: 500,000 remaining- Concurrency: Max parallel jobs. Run parallel operations up to this limit.
- Credits: Remaining API credits. Each scrape/crawl consumes credits.
If not ready, see rules/install.md. For output handling guidelines, see rules/security.md.
bash
firecrawl search "query" --scrape --limit 3必须完成安装和身份验证,可通过检查状态:
firecrawl --status 🔥 firecrawl cli v1.8.0
● Authenticated via FIRECRAWL_API_KEY
Concurrency: 0/100 jobs (parallel scrape limit)
Credits: 500,000 remaining- 并发数:最大并行任务数,可运行不超过此限制的并行操作
- 点数:剩余API点数,每次抓取/爬取操作都会消耗点数
如果未就绪,请查看rules/install.md。输出处理指南请查看rules/security.md。
bash
firecrawl search "query" --scrape --limit 3Workflow
工作流
Follow this escalation pattern:
- Search - No specific URL yet. Find pages, answer questions, discover sources.
- Scrape - Have a URL. Extract its content directly.
- Map + Scrape - Large site or need a specific subpage. Use to find the right URL, then scrape it.
map --search - Crawl - Need bulk content from an entire site section (e.g., all /docs/).
- Browser - Scrape failed because content is behind interaction (pagination, modals, form submissions, multi-step navigation).
| Need | Command | When |
|---|---|---|
| Find pages on a topic | | No specific URL yet |
| Get a page's content | | Have a URL, page is static or JS-rendered |
| Find URLs within a site | | Need to locate a specific subpage |
| Bulk extract a site section | | Need many pages (e.g., all /docs/) |
| AI-powered data extraction | | Need structured data from complex sites |
| Interact with a page | | Content requires clicks, form fills, pagination, or login |
| Download a site to files | | Save an entire site as local files |
For detailed command reference, use the individual skill for each command (e.g., , ) or run .
firecrawl-searchfirecrawl-browserfirecrawl <command> --helpScrape vs browser:
- Use first. It handles static pages and JS-rendered SPAs.
scrape - Use when you need to interact with a page, such as clicking buttons, filling out forms, navigating through a complex site, infinite scroll, or when scrape fails to grab all the content you need.
browser - Never use browser for web searches - use instead.
search
Avoid redundant fetches:
- already fetches full page content. Don't re-scrape those URLs.
search --scrape - Check for existing data before fetching again.
.firecrawl/
遵循以下升级模式:
- 搜索 - 暂无特定URL,用于查找页面、回答问题、发掘信息来源
- 抓取 - 已有确定URL,直接提取其内容
- 映射+抓取 - 针对大型站点或需要查找特定子页面的场景,使用找到正确URL后再进行抓取
map --search - 爬取 - 需要获取整个站点版块的批量内容(例如所有/docs/路径下的页面)
- 浏览器 - 常规抓取失败,因为内容需要交互操作(分页、模态框、表单提交、多步骤导航等)
| 所需场景 | 命令 | 适用时机 |
|---|---|---|
| 查找某主题相关的页面 | | 暂无特定URL |
| 获取单个页面的内容 | | 已有确定URL,页面为静态或JS渲染 |
| 查找站点内的URL | | 需要定位特定子页面 |
| 批量提取站点版块内容 | | 需要获取多个页面(例如所有/docs/路径下的内容) |
| AI驱动的数据提取 | | 需要从复杂站点获取结构化数据 |
| 与页面进行交互 | | 内容需要点击、表单填写、分页操作或登录才能访问 |
| 将站点下载为本地文件 | | 把整个站点保存为本地文件 |
如需详细的命令参考,可使用每个命令对应的独立技能(例如、)或运行。
firecrawl-searchfirecrawl-browserfirecrawl <command> --help抓取 vs 浏览器模式:
- 优先使用,它支持处理静态页面和JS渲染的单页应用
scrape - 当需要与页面交互时使用,例如点击按钮、填写表单、在复杂站点内导航、处理无限滚动,或是scrape无法抓取到所需全部内容时
browser - 绝对不要用browser模式进行网页搜索,请使用代替
search
避免重复抓取:
- 已经获取了完整的页面内容,不要重复抓取这些URL
search --scrape - 再次抓取前先检查目录下是否已有对应数据
.firecrawl/
Output & Organization
输出与组织
Unless the user specifies to return in context, write results to with . Add to . Always quote URLs - shell interprets and as special characters.
.firecrawl/-o.firecrawl/.gitignore?&bash
firecrawl search "react hooks" -o .firecrawl/search-react-hooks.json --json
firecrawl scrape "<url>" -o .firecrawl/page.mdNaming conventions:
.firecrawl/search-{query}.json
.firecrawl/search-{query}-scraped.json
.firecrawl/{site}-{path}.mdNever read entire output files at once. Use , , or incremental reads:
grepheadbash
wc -l .firecrawl/file.md && head -50 .firecrawl/file.md
grep -n "keyword" .firecrawl/file.mdSingle format outputs raw content. Multiple formats (e.g., ) output JSON.
--format markdown,links除非用户指定要在上下文中返回结果,否则请使用参数将结果写入目录。请将添加到中。永远要给URL加上引号——shell会将和识别为特殊字符。
-o.firecrawl/.firecrawl/.gitignore?&bash
firecrawl search "react hooks" -o .firecrawl/search-react-hooks.json --json
firecrawl scrape "<url>" -o .firecrawl/page.md命名规范:
.firecrawl/search-{query}.json
.firecrawl/search-{query}-scraped.json
.firecrawl/{site}-{path}.md永远不要一次性读取整个输出文件,使用、或增量读取的方式:
grepheadbash
wc -l .firecrawl/file.md && head -50 .firecrawl/file.md
grep -n "keyword" .firecrawl/file.md单格式输出会返回原始内容,多格式输出(例如)会返回JSON。
--format markdown,linksWorking with Results
处理结果
These patterns are useful when working with file-based output ( flag) for complex tasks:
-obash
undefined当你针对复杂任务使用基于文件的输出(参数)时,以下模式非常实用:
-obash
undefinedExtract URLs from search
从搜索结果中提取URL
jq -r '.data.web[].url' .firecrawl/search.json
jq -r '.data.web[].url' .firecrawl/search.json
Get titles and URLs
获取标题和URL
jq -r '.data.web[] | "(.title): (.url)"' .firecrawl/search.json
undefinedjq -r '.data.web[] | "(.title): (.url)"' .firecrawl/search.json
undefinedParallelization
并行化
Run independent operations in parallel. Check for concurrency limit:
firecrawl --statusbash
firecrawl scrape "<url-1>" -o .firecrawl/1.md &
firecrawl scrape "<url-2>" -o .firecrawl/2.md &
firecrawl scrape "<url-3>" -o .firecrawl/3.md &
waitFor browser, launch separate sessions for independent tasks and operate them in parallel via .
--session <id>可并行运行独立的操作,运行查看并发限制:
firecrawl --statusbash
firecrawl scrape "<url-1>" -o .firecrawl/1.md &
firecrawl scrape "<url-2>" -o .firecrawl/2.md &
firecrawl scrape "<url-3>" -o .firecrawl/3.md &
wait对于browser模式,可以为独立任务启动单独的会话,通过参数并行操作。
--session <id>Credit Usage
点数使用
bash
firecrawl credit-usage
firecrawl credit-usage --json --pretty -o .firecrawl/credits.jsonbash
firecrawl credit-usage
firecrawl credit-usage --json --pretty -o .firecrawl/credits.json