diff --git a/features/browser.mdx b/features/browser.mdx index 545625e8..4a13c66a 100644 --- a/features/browser.mdx +++ b/features/browser.mdx @@ -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 @@ -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`. + + @@ -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" } ``` diff --git a/snippets/v2/browser/execute/output.mdx b/snippets/v2/browser/execute/output.mdx index 3b375f31..f407f67c 100644 --- a/snippets/v2/browser/execute/output.mdx +++ b/snippets/v2/browser/execute/output.mdx @@ -1,6 +1,10 @@ ```json Response { "success": true, - "result": "Example Domain" + "stdout": "", + "result": "Example Domain", + "stderr": "", + "exitCode": 0, + "killed": false } ``` diff --git a/snippets/v2/browser/launch/output.mdx b/snippets/v2/browser/launch/output.mdx index 33460a2a..651b11b0 100644 --- a/snippets/v2/browser/launch/output.mdx +++ b/snippets/v2/browser/launch/output.mdx @@ -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" } ``` diff --git a/snippets/v2/browser/list/output.mdx b/snippets/v2/browser/list/output.mdx index 837c2a61..da9073d5 100644 --- a/snippets/v2/browser/list/output.mdx +++ b/snippets/v2/browser/list/output.mdx @@ -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" }