Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ Command-line interface for Firecrawl. Scrape, crawl, and extract data from any w
npm install -g firecrawl-cli
```

Or set up everything in one command (install CLI globally, authenticate, and add skills):
Or set up everything in one command (install CLI globally, authenticate, and add skills across all detected coding editors):

```bash
npx -y firecrawl-cli@latest init --all --browser
npx -y firecrawl-cli@latest init -y --browser
```

- `--all` installs the firecrawl skill to every detected AI coding agent
- `-y` runs setup non-interactively
- `--browser` opens the browser for Firecrawl authentication automatically
- skills install globally to every detected AI coding agent by default

### Setup Skills and MCP

Expand All @@ -25,6 +26,8 @@ If you are using an AI coding agent like Claude Code, you can also install the s
firecrawl setup skills
```

This installs skills globally across all detected coding editors by default. Use `--agent <agent>` to scope it to one editor.

To install the Firecrawl MCP server into your editors (Cursor, Claude Code, VS Code, etc.):

```bash
Expand All @@ -34,7 +37,7 @@ firecrawl setup mcp
Or directly via npx:

```bash
npx skills add firecrawl/cli
npx skills add firecrawl/cli --full-depth --global --all
npx add-mcp "npx -y firecrawl-mcp" --name firecrawl
```

Expand Down
57 changes: 57 additions & 0 deletions skills/firecrawl-agent/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: firecrawl-agent
description: |
AI-powered autonomous data extraction that navigates complex sites and returns structured JSON. Use this skill when the user wants structured data from websites, needs to extract pricing tiers, product listings, directory entries, or any data as JSON with a schema. Triggers on "extract structured data", "get all the products", "pull pricing info", "extract as JSON", or when the user provides a JSON schema for website data. More powerful than simple scraping for multi-page structured extraction.
allowed-tools:
- Bash(firecrawl *)
- Bash(npx firecrawl *)
---

# firecrawl agent

AI-powered autonomous extraction. The agent navigates sites and extracts structured data (takes 2-5 minutes).

## When to use

- You need structured data from complex multi-page sites
- Manual scraping would require navigating many pages
- You want the AI to figure out where the data lives

## Quick start

```bash
# Extract structured data
firecrawl agent "extract all pricing tiers" --wait -o .firecrawl/pricing.json

# With a JSON schema for structured output
firecrawl agent "extract products" --schema '{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number"}}}' --wait -o .firecrawl/products.json

# Focus on specific pages
firecrawl agent "get feature list" --urls "<url>" --wait -o .firecrawl/features.json
```

## Options

| Option | Description |
| ---------------------- | ----------------------------------------- |
| `--urls <urls>` | Starting URLs for the agent |
| `--model <model>` | Model to use: spark-1-mini or spark-1-pro |
| `--schema <json>` | JSON schema for structured output |
| `--schema-file <path>` | Path to JSON schema file |
| `--max-credits <n>` | Credit limit for this agent run |
| `--wait` | Wait for agent to complete |
| `--pretty` | Pretty print JSON output |
| `-o, --output <path>` | Output file path |

## Tips

- Always use `--wait` to get results inline. Without it, returns a job ID.
- Use `--schema` for predictable, structured output — otherwise the agent returns freeform data.
- Agent runs consume more credits than simple scrapes. Use `--max-credits` to cap spending.
- For simple single-page extraction, prefer `scrape` — it's faster and cheaper.

## See also

- [firecrawl-scrape](../firecrawl-scrape/SKILL.md) — simpler single-page extraction
- [firecrawl-browser](../firecrawl-browser/SKILL.md) — manual browser automation (more control)
- [firecrawl-crawl](../firecrawl-crawl/SKILL.md) — bulk extraction without AI
107 changes: 107 additions & 0 deletions skills/firecrawl-browser/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
name: firecrawl-browser
description: |
Cloud browser automation for pages requiring interaction — clicks, form fills, login, pagination, infinite scroll. Use this skill when the user needs to interact with a webpage, log into a site, click buttons, fill forms, navigate multi-step flows, handle pagination, or when regular scraping fails because content requires JavaScript interaction. Triggers on "click", "fill out the form", "log in to", "paginated", "infinite scroll", "interact with the page", or "scrape failed". Provides remote Chromium sessions with persistent profiles.
allowed-tools:
- Bash(firecrawl *)
- Bash(npx firecrawl *)
---

# firecrawl browser

Cloud Chromium sessions in Firecrawl's remote sandboxed environment. Interact with pages that require clicks, form fills, pagination, or login.

## When to use

- Content requires interaction: clicks, form fills, pagination, login
- `scrape` failed because content is behind JavaScript interaction
- You need to navigate a multi-step flow
- Last resort in the [workflow escalation pattern](firecrawl-cli): search → scrape → map → crawl → **browser**
- **Never use browser for web searches** — use `search` instead

## Quick start

```bash
# Typical browser workflow
firecrawl browser "open <url>"
firecrawl browser "snapshot -i" # see interactive elements with @ref IDs
firecrawl browser "click @e5" # interact with elements
firecrawl browser "fill @e3 'search query'" # fill form fields
firecrawl browser "scrape" -o .firecrawl/page.md # extract content
firecrawl browser close
```

Shorthand auto-launches a session if none exists — no setup required.

## Commands

| Command | Description |
| -------------------- | ---------------------------------------- |
| `open <url>` | Navigate to a URL |
| `snapshot -i` | Get interactive elements with `@ref` IDs |
| `screenshot` | Capture a PNG screenshot |
| `click <@ref>` | Click an element by ref |
| `type <@ref> <text>` | Type into an element |
| `fill <@ref> <text>` | Fill a form field (clears first) |
| `scrape` | Extract page content as markdown |
| `scroll <direction>` | Scroll up/down/left/right |
| `wait <seconds>` | Wait for a duration |
| `eval <js>` | Evaluate JavaScript on the page |

Session management: `launch-session --ttl 600`, `list`, `close`

## Options

| Option | Description |
| ---------------------------- | -------------------------------------------------- |
| `--ttl <seconds>` | Session time-to-live |
| `--ttl-inactivity <seconds>` | Inactivity timeout |
| `--session <id>` | Use a specific session ID |
| `--profile <name>` | Use a named profile (persists state) |
| `--no-save-changes` | Read-only reconnect (don't write to session state) |
| `-o, --output <path>` | Output file path |

## Profiles

Profiles survive close and can be reconnected by name. Use them for login-then-work flows:

```bash
# Session 1: Login and save state
firecrawl browser launch-session --profile my-app
firecrawl browser "open https://app.example.com/login"
firecrawl browser "snapshot -i"
firecrawl browser "fill @e3 'user@example.com'"
firecrawl browser "click @e7"
firecrawl browser "wait 2"
firecrawl browser close

# Session 2: Come back authenticated
firecrawl browser launch-session --profile my-app
firecrawl browser "open https://app.example.com/dashboard"
firecrawl browser "scrape" -o .firecrawl/dashboard.md
firecrawl browser close
```

Read-only reconnect (no writes to session state):

```bash
firecrawl browser launch-session --profile my-app --no-save-changes
```

Shorthand with profile:

```bash
firecrawl browser --profile my-app "open https://example.com"
```

## Tips

- If you get forbidden errors, the session may have expired — create a new one.
- For parallel browser work, launch separate sessions and operate them via `--session <id>`.
- Always `close` sessions when done to free resources.

## See also

- [firecrawl-scrape](../firecrawl-scrape/SKILL.md) — try scrape first, escalate to browser only when needed
- [firecrawl-search](../firecrawl-search/SKILL.md) — for web searches (never use browser for searching)
- [firecrawl-agent](../firecrawl-agent/SKILL.md) — AI-powered extraction (less manual control)
Loading
Loading