npm install -g firecrawl-cli
firecrawl login --browser # Recommended for agents
# or
export FIRECRAWL_API_KEY=fc-YOUR-KEY
firecrawl --status # Verify: shows credits + concurrency
| Command | Purpose |
|---|---|
| --------- | --------- |
firecrawl scrape | Scrape single URL |
firecrawl search " | Web search (+ optional scrape) |
firecrawl map | Discover all URLs on a site |
firecrawl crawl | Crawl entire website (async job) |
firecrawl browser | Cloud browser sandbox automation |
firecrawl agent " | NL-driven web agent queries |
Scrape (most common):
firecrawl https://example.com --only-main-content # Clean markdown
firecrawl https://example.com --format markdown,links # Multiple formats → JSON
firecrawl https://example.com -o output.md # Save to file
Crawl a docs site:
firecrawl crawl https://docs.example.com --limit 50 --max-depth 2 --wait --progress -o docs.json
Browser automation (AI agents):
firecrawl browser launch-session
firecrawl browser execute "open https://example.com"
firecrawl browser execute "snapshot" # Returns @ref IDs
firecrawl browser execute "click @e5"
firecrawl browser execute "scrape"
firecrawl browser close
AI agent query:
firecrawl agent "Find top 5 AI startups and funding" --wait
firecrawl agent "Compare pricing" --urls https://a.com,https://b.com --wait
See references/commands.md for all commands, options, and examples.
--only-main-content for clean article content (removes nav/footer)crawl returns a job ID immediately — use --wait to block or poll with job ID laterexecute default mode is agent-browser (bash) — 40+ commands, best for agentsspark-1-mini (default) is 60% cheaper than spark-1-pro for agent queries--status before parallelizing scrape jobs--api-url is set共 1 个版本