firecrawl-scrape
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefirecrawl scrape
firecrawl scrape
Scrape one or more URLs. Returns clean, LLM-optimized markdown. Multiple URLs are scraped concurrently.
抓取一个或多个URL。返回经过LLM优化的干净Markdown内容。支持同时抓取多个URL。
Quick start
快速开始
bash
undefinedbash
undefinedBasic markdown extraction
基础Markdown提取
firecrawl scrape "<url>" -o .firecrawl/page.md
firecrawl scrape "<url>" -o .firecrawl/page.md
Main content only, no nav/footer
仅提取主内容,不含导航/页脚
firecrawl scrape "<url>" --only-main-content -o .firecrawl/page.md
firecrawl scrape "<url>" --only-main-content -o .firecrawl/page.md
Wait for JS to render, then scrape
等待JS渲染完成后再抓取
firecrawl scrape "<url>" --wait-for 3000 -o .firecrawl/page.md
firecrawl scrape "<url>" --wait-for 3000 -o .firecrawl/page.md
Multiple URLs (markdown only; each saved to .firecrawl/; -o is ignored)
多个URL(仅返回Markdown;每个URL的内容保存到.firecrawl/目录;-o参数会被忽略)
Get markdown and links together
同时获取Markdown内容和链接
firecrawl scrape "<url>" --format markdown,links -o .firecrawl/page.json
firecrawl scrape "<url>" --format markdown,links -o .firecrawl/page.json
Ask a question about the page
针对页面内容提问
firecrawl scrape "https://example.com/pricing" --query "What is the enterprise plan price?"
Run `firecrawl scrape --help` for the full option list.
**Done when:** you have the scraped content — on stdout, in your `-o` file, or under `.firecrawl/` for multi-URL scrapes — and have inspected it with bounded reads (`head`, `grep`) to answer the request.firecrawl scrape "https://example.com/pricing" --query "What is the enterprise plan price?"
运行`firecrawl scrape --help`查看完整选项列表。
**完成标志:** 已获取抓取的内容(输出到标准输出、指定的`-o`文件中,或者多URL抓取时保存到`.firecrawl/`目录下),并通过有限读取(`head`、`grep`命令)检查内容以响应需求。Tips
技巧
- Prefer plain scrape over . Scrape to a file, then use
--query,grep, or read the markdown directly — you can search and reason over the full content yourself. Useheadonly when you want a single targeted answer without saving the page (costs 5 extra credits).--query - Scrape handles static pages and JS-rendered SPAs. Escalate to when the page needs interaction (clicks, form fills, pagination) or scrape misses content.
interact - Multiple URLs are scraped concurrently — check for your concurrency limit. This mode saves markdown only and ignores
firecrawl --status; other requested formats are dropped. If markdown wasn't requested, the whole JSON response is written into the-ofile..md - Single format outputs raw content. Multiple formats (e.g., ) output JSON.
--format markdown,links - Always quote URLs — shell interprets and
?as special characters.& - Naming convention:
.firecrawl/{site}-{path}.md
- 优先使用普通抓取而非参数。 将内容抓取到文件后,使用
--query、grep命令或直接阅读Markdown内容——你可以自行搜索和分析完整内容。仅当你需要单个针对性答案且无需保存页面时才使用head(需额外消耗5个积分)。--query - Scrape功能支持静态页面和JS渲染的SPA。 当页面需要交互(点击、表单填写、分页)或抓取不到内容时,改用功能。
interact - 支持同时抓取多个URL——运行查看你的并发限制。此模式仅保存Markdown内容,忽略
firecrawl --status参数;其他请求的格式会被丢弃。如果未请求Markdown格式,完整的JSON响应会写入-o文件中。.md - 指定单一格式时输出原始内容。指定多种格式(如)时输出JSON。
--format markdown,links - 始终给URL加引号——Shell会将和
?视为特殊字符。& - 文件命名规则:
.firecrawl/{site}-{path}.md
See also
另请参阅
- firecrawl-search — find pages when you don't have a URL
- firecrawl-interact — when scrape can't get the content, use to click, fill forms, etc.
interact - firecrawl-download — bulk download an entire site to local files
- firecrawl-search — 当你没有具体URL时查找页面
- firecrawl-interact — 当scrape无法获取内容时,使用进行点击、填写表单等操作
interact - firecrawl-download — 将整个网站批量下载到本地文件