For agent workflows, use Interact. Interact is the supported CLI/MCP path and can be driven with prompts or code after a scrape; MCP also supports opening from a URL directly.
| Surface | Use it for | Entry point | Agent surface |
|---|---|---|---|
| Browser Sandbox | Standalone browser sessions for API/SDK users that need a sandbox, CDP URL, live view, or persistent session lifecycle | POST /v2/interact | API and SDKs; hidden CLI browser command is legacy |
| Interact | Acting on a scraped page; MCP can also open from a URL with firecrawl_interact URL mode | POST /v2/scrape/{scrapeId}/interact, CLI interact after scrape, or MCP firecrawl_interact | Recommended for CLI/MCP agent workflows |
firecrawl browser CLI command is legacy; CLI and MCP agent flows should use scrape + interact instead.
To add Interact support to an AI coding agent (Claude Code, Codex, Open Code, Cursor, etc.), install the Firecrawl skill:
Quick Start
Create a session, execute code, and close it:- No Driver Installation - No Chromium binary, no
playwright install, no driver compatibility issues - Python, JavaScript & Bash - Send code via API, CLI, or SDK and get results back. All three languages run remotely in the sandbox
- agent-browser - Pre-installed CLI with 60+ commands. AI agents write simple bash commands instead of Playwright code
- Playwright loaded - Playwright comes pre-installed in the sandbox. Agents can write Playwright code if they prefer.
- CDP Access - Connect your own Playwright instance over WebSocket when you need full control
- Live View - Watch sessions in real time via embeddable stream URL
- Interactive Live View - Let users interact with the browser directly through an embeddable interactive stream
Launch a Session
Returns a session ID, CDP URL, and live view URL.Response
Execute Code
Run Python, JavaScript, or bash code in your session. Output is returned viastdout; for Node.js, the last expression value is also available in result.
Response
Handling File Downloads
Files downloaded inside a session can be captured and returned as base64. Use Playwright’s download API via the execute endpoint:The sandbox filesystem is ephemeral — downloaded files are lost when the session ends. To persist files, read their content within the session and save it to your own storage. Persistent profiles preserve browser state (cookies, localStorage) but not files on disk.
agent-browser (Bash Mode)
agent-browser is a headless browser CLI pre-installed in every sandbox. Instead of writing Playwright code, agents send simple bash commands. The CLI auto-injects--cdp so agent-browser connects to your active session automatically.
The
firecrawl browser CLI examples below are for legacy Browser Sandbox sessions. For CLI/MCP agent workflows, prefer firecrawl interact or the MCP firecrawl_interact tool.Shorthand
The fastest way to use browser. Both the shorthand andexecute send commands to agent-browser automatically. The shorthand just skips execute and auto-launches a session if needed:
CLI
The explicit form usesexecute. Commands are sent to agent-browser automatically — you don’t need to type agent-browser or use --bash:
API & SDK
Uselanguage: "bash" to run agent-browser commands via the API or SDKs:
Session Management
Persistent Sessions
By default, each browser session starts with a clean slate. Withprofile, you can save and reuse browser state across sessions. This is useful for staying logged in and preserving preferences.
To save or select a profile, use the profile parameter when creating a session.
| Parameter | Default | Description |
|---|---|---|
name | — | A name for the persistent profile. Sessions with the same name share storage. |
saveChanges | true | When true, browser state is saved back to the profile on close. Set to false to load existing data without writing — useful when you need multiple concurrent readers. |
Only one session can save to a profile at a time. If another session is already saving, you’ll get a
409 error. You can still open the same profile with saveChanges: false, or try again later.List Sessions
Response
TTL Configuration
Sessions have two TTL controls:| Parameter | Default | Description |
|---|---|---|
ttl | 600s (10 min) | Maximum session lifetime (30-3600s) |
activityTtl | 300s (5 min) | Auto-close after inactivity (10-3600s) |
Close a Session
Live View
Every session returns aliveViewUrl in the response that you can embed to watch the browser in real time. Useful for debugging, demos, or building browser-powered UIs.
Response
Interactive Live View
The response also includes aninteractiveLiveViewUrl. Unlike the standard live view which is view-only, the interactive live view allows users to click, type, and interact with the browser session directly through the embedded stream. This is useful for building user-facing browser UIs, collaborative debugging, or any scenario where the viewer needs to control the browser.
Connecting via CDP
Every session exposes a CDP WebSocket URL. The execute API and--bash flag cover most use cases, but if you need full local control you can connect directly.
When to Use Browser
Use Cases
- Competitive intelligence - Browse competitor sites, navigate search forms and filters, extract pricing and features into structured data
- Knowledge base ingestion - Navigate help centers, docs, and support portals that require clicks, pagination, or authentication
- Market research - Launch parallel browser sessions to build datasets from job boards, real estate listings, or legal databases
Pricing
Pricing is straightforward: 2 credits per browser minute. Free users get 5 hours of free usage.Rate limits
For the initial launch, we allow all plans up to have up to 20 concurrent browser sessions.API Reference
Have feedback or need help? Email help@firecrawl.com or reach out on Discord.
Are you an AI agent that needs a Firecrawl API key? See firecrawl.dev/agent-onboarding/SKILL.md for automated onboarding instructions.

