Search, scrape, interact, crawl, map, and run agent jobs directly from the terminal. The Firecrawl CLI works standalone or with skills that AI coding agents like Codex, Claude Code, Cursor, and OpenCode can discover and use automatically.
Installation#
If you are using an AI agent like Codex, Claude Code, Cursor, or OpenCode, you can install the Firecrawl skills below and the agent will set them up for you.
--allskips agent selection and initializes every detected agent--browseropens the browser for Firecrawl authentication automatically
After installing the skills, restart your agent for it to discover them.
You can also manually install the Firecrawl CLI globally using npm:
Authentication#
Before using the CLI, you need to authenticate with your Firecrawl API key.
Some CLI commands work without logging in. With no API key configured, supported commands fall back to the keyless free tier — free, but rate-limited per IP. See Rate Limits for the current keyless command list and caveats. Sign up for a free key for 1,000 credits and higher limits; the CLI uses it automatically once configured.
Login#
View Configuration#
Logout#
Connect the CLI to self-hosted Firecrawl#
First, get one scrape working with the self-hosting guide. Then point the CLI at that API with --api-url or FIRECRAWL_API_URL:
When you use a custom API URL instead of https://api.firecrawl.dev, the CLI skips Firecrawl Cloud API-key authentication. That matches the trusted-network quickstart, where USE_DB_AUTHENTICATION=false.
Keep an unauthenticated API on a trusted network. If you add an authentication proxy or another access-control layer, verify that the CLI can send the credentials that layer requires before depending on this path.
The CLI can call only the capabilities enabled in your deployment. Check self-hosted feature support before using Cloud-only or provider-dependent commands.
Check Status#
Verify installation, authentication, and view rate limits:
Output when ready:
- Concurrency: Maximum parallel jobs. Run parallel operations close to this limit but not above.
- Credits: Remaining API credits. Each scrape/crawl consumes credits.
Commands#
The hidden firecrawl browser command is deprecated for agent workflows. Use firecrawl scrape <url> first, then firecrawl interact ... with the resulting scrape session.
Scrape#
Scrape a single URL and extract its content in various formats.
Use --only-main-content to get clean output without navigation, footers, and
ads. This is recommended for most use cases where you want just the article or
main page content.
Output Formats#
Scrape Options#
Available Options:
| Option | Short | Description |
|---|---|---|
--url <url> | -u | URL to scrape (alternative to positional argument) |
--format <formats> | -f | Output formats (comma-separated): markdown, html, rawHtml, links, screenshot, json, images, summary, changeTracking, attributes, branding |
--html | -H | Shortcut for --format html |
--only-main-content | Extract only main content | |
--wait-for <ms> | Wait time in milliseconds for JS rendering | |
--screenshot | Take a screenshot | |
--full-page-screenshot | Take a full page screenshot | |
--include-tags <tags> | HTML tags to include (comma-separated) | |
--exclude-tags <tags> | HTML tags to exclude (comma-separated) | |
--schema <json> | JSON schema for structured extraction | |
--schema-file <path> | Path to JSON schema file | |
--actions <json> | JSON actions array to run during scrape | |
--actions-file <path> | Path to JSON actions file | |
--proxy <proxy> | Proxy mode for scraping (for example, auto or basic) | |
--redact-pii | Redact personally identifiable information from returned content | |
--output <path> | -o | Save output to file |
--json | Force JSON output even with single format | |
--pretty | Pretty print JSON output | |
--timing | Show request timing and other useful information |
Search#
Search the web and optionally scrape the results.
Search Options#
Available Options:
| Option | Description |
|---|---|
--limit <number> | Maximum results (default: 5, max: 100) |
--sources <sources> | Sources to search: web, images, news (comma-separated) |
--categories <categories> | Filter by category: research, pdf, developer (comma-separated) |
--tbs <value> | Time filter: qdr:h (hour), qdr:d (day), qdr:w (week), qdr:m (month), qdr:y (year) |
--location <location> | Geo-targeting (e.g., "Berlin,Germany") |
--country <code> | ISO country code (default: US) |
--timeout <ms> | Timeout in milliseconds (default: 60000) |
--ignore-invalid-urls | Exclude URLs invalid for other Firecrawl endpoints |
--scrape | Scrape search results |
--scrape-formats <formats> | Formats for scraped content (default: markdown) |
--only-main-content | Include only main content when scraping (default: true) |
--json | Output as JSON |
--output <path> | Save output to file |
--pretty | Pretty print JSON output |
Developer#
Search the Developer Index — issues, merged pull requests, and READMEs from public code repositories, alongside curated documentation sites.
Available Options:
| Option | Description |
|---|---|
--limit <number> | Number of results to return (default: 10, max: 100) |
--skills-only | Search only indexed agent-skill files (default: false) |
--json | Output as compact JSON |
--output <path> | Save output to file |
--pretty | Pretty print JSON output |
Map#
Discover all URLs on a website quickly.
Map Options#
Available Options:
| Option | Description |
|---|---|
--url <url> | URL to map (alternative to positional argument) |
--limit <number> | Maximum URLs to discover |
--search <query> | Filter URLs by search query |
--sitemap <mode> | Sitemap handling: include, skip, only |
--include-subdomains | Include subdomains |
--ignore-query-parameters | Treat URLs with different params as same |
--wait | Wait for map to complete |
--timeout <seconds> | Timeout in seconds |
--json | Output as JSON |
--output <path> | Save output to file |
--pretty | Pretty print JSON output |
Interact#
Scrape a page, then interact with it using natural language or code. Interact uses the most recent scrape by default, or you can pass a specific scrape ID.
Available Options:
| Option | Description |
|---|---|
-p, --prompt <text> | AI prompt (alternative to positional argument) |
-c, --code <code> | Code to execute in the live page session |
-s, --scrape-id <id> | Scrape job ID (default: last scrape) |
--python | Execute code as Python/Playwright |
--node | Execute code as Node.js/Playwright (default) |
--bash | Execute code as Bash |
--timeout <seconds> | Timeout in seconds (1-300, default: 30) |
--output <path> | Save output to file |
--json | Output as JSON format |
Crawl#
Crawl an entire website starting from a URL.
Check Crawl Status#
Crawl Options#
Available Options:
| Option | Description |
|---|---|
--url <url> | URL to crawl (alternative to positional argument) |
--wait | Wait for crawl to complete |
--progress | Show progress indicator while waiting |
--poll-interval <seconds> | Polling interval (default: 5) |
--timeout <seconds> | Timeout when waiting |
--status | Check status of existing crawl job |
--limit <number> | Maximum pages to crawl |
--max-depth <number> | Maximum crawl depth |
--include-paths <paths> | Paths to include (comma-separated) |
--exclude-paths <paths> | Paths to exclude (comma-separated) |
--sitemap <mode> | Sitemap handling: include, skip, only |
--allow-subdomains | Include subdomains |
--allow-external-links | Follow external links |
--crawl-entire-domain | Crawl entire domain |
--ignore-query-parameters | Treat URLs with different params as same |
--delay <ms> | Delay between requests |
--max-concurrency <n> | Maximum concurrent requests |
--scrape-options <json> | JSON scrape options passed to each page |
--scrape-options-file <path> | Path to scrape options JSON file |
--webhook <url-or-json> | Webhook URL or configuration |
--cancel | Cancel an active crawl job by job ID |
--output <path> | Save output to file |
--pretty | Pretty print JSON output |
Monitor#
Create recurring scrapes or crawls that diff each run against the previous snapshot. Add a goal when you want Firecrawl to judge which changed pages are meaningful for your use case.
Monitor goals should stay short and faithful to the user's intent: say what should trigger an alert, restate any stated scope, and include exclusions only when they are obvious or explicitly requested. If the user asks for "any change", keep the goal broad.
Available Options:
| Option | Description |
|---|---|
--name <name> | Monitor name |
--goal <goal> | Goal for meaningful-change judging |
--cron <expression> | Cron schedule, for example */30 * * * * |
--schedule <text> | Natural-language schedule, for example hourly |
--timezone <tz> | Schedule timezone, default UTC |
--page <url> | Single page URL to scrape on each check |
--scrape-urls <list> | Comma-separated page URLs to scrape on each check |
--crawl-url <url> | Root URL for a crawl target |
--webhook-url <url> | Webhook destination |
--webhook-events <list> | Comma-separated monitor events |
--email <list> | Comma-separated email recipients |
--retention-days <n> | Snapshot retention window |
--page-status <state> | Filter pages on monitor check |
--state <state> | Set monitor state on monitor update: active/paused |
Agent#
Search and gather data from the web using natural language prompts.
Agent Options#
Available Options:
| Option | Description |
|---|---|
--urls <urls> | Optional list of URLs to focus the agent on (comma-separated) |
--model <model> | Model to use. Defaults to spark-2, the model every run executes on. Spark 1 models are deprecated and route to spark-2 |
--schema <json> | JSON schema for structured output (inline JSON string) |
--schema-file <path> | Path to JSON schema file for structured output |
--max-credits <number> | Maximum credits to spend (job fails if limit reached) |
--webhook <url-or-json> | Webhook URL or configuration |
--status | Check status of existing agent job |
--cancel | Cancel an active agent job by job ID |
--wait | Wait for agent to complete before returning results |
--poll-interval <seconds> | Polling interval when waiting (default: 5) |
--timeout <seconds> | Timeout when waiting (default: no timeout) |
--output <path> | Save output to file |
--json | Output as JSON format |
Credit Usage#
Check your team's credit balance and usage.
Version#
Display the CLI version.
Global Options#
These options are available for all commands:
| Option | Short | Description |
|---|---|---|
--status | Show version, auth, concurrency, and credits | |
--api-key <key> | -k | Override stored API key for this command |
--api-url <url> | Use custom API URL (for self-hosted/local development) | |
--help | -h | Show help for a command |
--version | -V | Show CLI version |
init also accepts --skip-auth, --skip-install, --skip-skills, and --agent <name>. See firecrawl init --help.
Output Handling#
The CLI outputs to stdout by default, making it easy to pipe or redirect:
Format Behavior#
- Single format: Outputs raw content (markdown text, HTML, etc.)
- Multiple formats: Outputs JSON with all requested data
Examples#
Quick Scrape#
Full Site Crawl#
Site Discovery#
Research Workflow#
Agent#
Combine with Other Tools#
Telemetry#
The CLI collects anonymous usage data during authentication to help improve the product:
- CLI version, OS, and Node.js version
- Development tool detection (e.g., Cursor, VS Code, Claude Code)
No command data, URLs, or file contents are collected via the CLI.
To disable telemetry, set the environment variable:
Open Source#
The Firecrawl CLI and all three skill segments are open source on GitHub:
firecrawl/cli— the CLI and CLI skills (live web work)firecrawl/skills— build skills (integrate Firecrawl into application code)firecrawl/firecrawl-workflows— workflow skills (repeatable deliverables such as research briefs, SEO audits, lead lists, and design clones)
Are you an AI agent that needs a Firecrawl API key? See firecrawl.dev/agent-onboarding/SKILL.md for automated onboarding instructions.

