---
title: "Interact with the browser session associated with a scrape job"
method: POST
path: "/scrape/{jobId}/interact"
tags: ["Scraping"]
---

# Interact with the browser session associated with a scrape job

`POST /scrape/{jobId}/interact`

## Path parameters

- `jobId` string, uuid, required

## Request body

- object
  - `code` string, required — Code to execute in the scrape-bound browser sandbox
  - `language` 'python' | 'node' | 'bash' — Language of the code to execute. Use `node` for JavaScript or `bash` for agent-browser CLI commands.
  - `timeout` integer — Execution timeout in seconds
  - `origin` string — Optional origin label used for execution telemetry

## Response `200`

Code executed successfully

- object
  - `success` boolean
  - `cdpUrl` string, nullable — Raw Chrome DevTools Protocol (CDP) WebSocket URL for the browser session. Use it to connect directly with Playwright, Puppeteer, or any CDP client.
  - `liveViewUrl` string, nullable — Read-only live view URL for the browser session
  - `interactiveLiveViewUrl` string, nullable — Interactive live view URL (viewers can control the browser)
  - `output` string, nullable — AI agent's final response (only present when using prompt)
  - `stdout` string, nullable — Standard output from the code execution
  - `result` string, nullable — Standard output (alias for stdout)
  - `stderr` string, nullable — Standard error output from the code execution
  - `exitCode` integer, nullable — Exit code of the executed process
  - `killed` boolean — Whether the process was killed due to timeout
  - `error` string, nullable — Error message if the code raised an exception

## Other responses

- `400` — Invalid job ID
- `402` — Payment required
- `403` — Forbidden
- `404` — Scrape job not found
- `409` — Scrape replay context is unavailable or session could not be initialized
- `410` — Scrape browser session has already been destroyed
- `429` — Too many active browser sessions
- `502` — Failed to communicate with browser service

---

[API](https://skmtc.net/firecrawl/apis/firecrawl-api.md) · [All operations](https://skmtc.net/firecrawl/apis/firecrawl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/firecrawl/firecrawl-api/versions/e350fafb5a2a/schema)
