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
12 changes: 8 additions & 4 deletions features/browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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 40+ commands. AI agents write simple bash commands instead of Playwright code
- **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
Expand All @@ -91,12 +91,15 @@ Returns a session ID, CDP URL, and live view URL.

## Execute Code

Run Python, JavaScript, or bash code in your session. Output is returned via `stdout`; for Node.js, the last expression value is also available in `result`.

<CodeGroup>

<ExecuteJS />
<ExecutePython />
<ExecuteCLI />
<ExecuteCURL />
<ExecuteCURLBash />

</CodeGroup>

Expand Down Expand Up @@ -296,9 +299,10 @@ Every session returns a `liveViewUrl` in the response that you can embed to watc
{
"success": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"cdpUrl": "wss://cdp-proxy.firecrawl.dev/cdp/550e8400-...",
"liveViewUrl": "https://liveview.firecrawl.dev/550e8400-...",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/550e8400-...?interactive=true"
"cdpUrl": "wss://browser.firecrawl.dev/cdp/550e8400...?token=abc123...",
"liveViewUrl": "https://liveview.firecrawl.dev/...",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/...",
"expiresAt": "2025-01-15T10:40:00Z"
}
```

Expand Down
6 changes: 5 additions & 1 deletion snippets/v2/browser/execute/output.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
```json Response
{
"success": true,
"result": "Example Domain"
"stdout": "",
"result": "Example Domain",
"stderr": "",
"exitCode": 0,
"killed": false
}
```
7 changes: 4 additions & 3 deletions snippets/v2/browser/launch/output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
{
"success": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"cdpUrl": "wss://cdp-proxy.firecrawl.dev/cdp/550e8400-e29b-41d4-a716-446655440000",
"liveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000?interactive=true"
"cdpUrl": "wss://browser.firecrawl.dev/cdp/550e8400...?token=abc123...",
"liveViewUrl": "https://liveview.firecrawl.dev/...",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/...",
"expiresAt": "2025-01-15T10:40:00Z"
}
```
6 changes: 3 additions & 3 deletions snippets/v2/browser/list/output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "active",
"cdpUrl": "wss://cdp-proxy.firecrawl.dev/cdp/550e8400-e29b-41d4-a716-446655440000",
"liveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/550e8400-e29b-41d4-a716-446655440000?interactive=true",
"cdpUrl": "wss://browser.firecrawl.dev/cdp/550e8400...?token=abc123...",
"liveViewUrl": "https://liveview.firecrawl.dev/...",
"interactiveLiveViewUrl": "https://liveview.firecrawl.dev/...",
"createdAt": "2025-01-15T10:30:00Z",
"lastActivity": "2025-01-15T10:35:00Z"
}
Expand Down