Browsers

Update Browser Session

Stop a browser session.

Refund: When you stop a session, unused time is automatically refunded. If the session ran for less than 1 hour, you'll receive a proportional refund. Billing is ceil to the nearest minute (minimum 1 minute).

patch/browsers/{session_id}

Request

  • Base URL: https://api.browser-use.com/api/v4
  • URL: https://api.browser-use.com/api/v4/browsers/{session_id}
  • Auth: API key in header X-Browser-Use-API-Key

Path parameters

session_idstring uuid required

Request body

action'stop' required

Available actions that can be performed on a browser session

Attributes: STOP: Stop the browser session (cannot be undone)

Response

Successful Response

idstring uuid required

Unique identifier for the session

status'active' | 'stopped' required

Enumeration of possible browser session states

Attributes: ACTIVE: Session is currently active and running (browser is running) STOPPED: Session has been stopped and is no longer active (browser is stopped)

liveUrlstring nullable

URL where the browser can be viewed live in real-time

cdpUrlstring nullable

Chrome DevTools Protocol URL for browser automation

timeoutAtstring date-time required

Timestamp when the session will timeout

startedAtstring date-time required

Timestamp when the session was created and started

finishedAtstring date-time nullable

Timestamp when the session was stopped (None if still active)

proxyUsedMbstring

Amount of proxy data used in MB

proxyCoststring

Cost of proxy usage in USD

browserCoststring

Cost of browser session hosting in USD

agentSessionIdstring uuid nullable

ID of the agent session that created this browser (None for standalone BaaS sessions)

recordingUrlstring nullable

Presigned URL to download the session recording, if recording was enabled. Only populated on GET /api/v2/browsers/{session_id}: the upload starts when the browser stops, so it is never ready in the stop response.

recordingAvailableboolean

False when a recording can never appear for this session: recording was disabled, or the browser stopped long enough ago that the upload is not coming. Only ever false from proof, so a failed recording lookup leaves it true. Clients polling for recordingUrl must stop when this is false.

metadataobject

Caller-supplied labels set when the browser was created.

Changes

No recorded changes to this operation across all 1 revision of this API.