Skip to main content
The Firecrawl CLI provides command-line access to the Firecrawl API, while the Firecrawl Skill enables AI agents like Claude Code, Codex, and OpenCode to use Firecrawl automatically.

Installation

Install the Firecrawl skill to enable CLI and AI agent integration:
After installation, restart your AI agent to activate the skill.

What is the Firecrawl Skill?

The Firecrawl skill is a tool that allows AI coding agents to:
  • Automatically scrape web pages when you ask questions about websites
  • Crawl entire sites to gather context for development tasks
  • Search the web for current information
  • Extract structured data from pages
  • Use the Agent feature for autonomous web research
Once installed, you can simply ask your AI agent to “scrape the documentation from example.com” or “find the latest pricing from their website”, and it will use Firecrawl automatically.

CLI Usage

The CLI is also available directly after installing the skill.

Authentication

Set your API key as an environment variable:
Get your API key from firecrawl.dev.

Scrape a URL

With options:

Crawl a Website

Crawl with automatic wait for completion:
With advanced options:

Map a Website

Discover all URLs:
Search for specific content:

Search the Web

Use the Agent

Autonomous web research:
With specific URLs:

Batch Scrape

Scrape multiple URLs:

Using with AI Agents

Once the skill is installed, you can interact with your AI agent naturally:

Example Prompts

Scraping:
Crawling:
Agent:
Search:

How It Works

When you ask your AI agent to perform web scraping tasks:
  1. The agent recognizes it needs web data
  2. It automatically invokes the Firecrawl skill
  3. Firecrawl fetches the content using your API key
  4. The agent receives clean, LLM-ready data
  5. The agent uses that data to answer your question
No manual intervention required!

Supported Agents

The Firecrawl skill works with:
  • Claude Code (Anthropic)
  • OpenCode (open-source coding agent)
  • Codex (GitHub Copilot)
  • Any agent that supports the Skills protocol

Configuration

Environment Variables

Skill Configuration

The skill can be configured via ~/.config/firecrawl/config.json:

CLI Reference

Global Flags

  • --api-key - Your Firecrawl API key (overrides environment variable)
  • --api-url - Custom API URL
  • --output - Output file path (default: stdout)
  • --format - Output format: json, markdown, text
  • --quiet - Suppress progress messages
  • --help - Show help

Commands

scrape <url>

Scrape a single URL. Options:
  • --formats - Output formats (comma-separated): markdown, html, screenshot, links, json
  • --only-main-content - Extract only main content
  • --include-tags - HTML tags to include
  • --exclude-tags - HTML tags to exclude
  • --wait-for - Wait time in milliseconds

crawl <url>

Crawl a website. Options:
  • --limit - Max pages to crawl
  • --max-depth - Maximum discovery depth
  • --exclude-paths - Paths to exclude (comma-separated)
  • --include-paths - Paths to include (comma-separated)
  • --formats - Output formats
  • --poll-interval - Polling interval in seconds

map <url>

Map all URLs on a website. Options:
  • --search - Search query to filter URLs
  • --limit - Max URLs to return
  • --include-subdomains - Include subdomains

search <query>

Search the web. Options:
  • --limit - Number of results
  • --scrape - Also scrape the results
  • --formats - Output formats for scraped content

agent <prompt>

Run the AI agent. Options:
  • --urls - URLs to focus on (comma-separated)
  • --model - Model to use: spark-1-mini, spark-1-pro
  • --schema - JSON schema file for structured output

batch-scrape <urls...>

Scrape multiple URLs. Options:
  • --formats - Output formats
  • --poll-interval - Polling interval in seconds

Output Formats

The CLI supports multiple output formats:

JSON (default)

Structured JSON output:

Markdown

Clean markdown output:

Text

Plain text output:

Error Handling

The CLI provides clear error messages:

Examples

Scrape and Save

Crawl with Filtering

Agent Research

Batch Processing

Updating

Update to the latest version:

Uninstalling

Remove the skill:

Resources

Support

For issues or questions: