Skip to main content
PATCH
/
browsers
/
{session_id}
Update Browser Session
const options = {
  method: 'PATCH',
  headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({action: 'stop'})
};

fetch('https://api.browser-use.com/api/v2/browsers/{session_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "active",
  "timeoutAt": "2023-11-07T05:31:56Z",
  "startedAt": "2023-11-07T05:31:56Z",
  "liveUrl": "<string>",
  "cdpUrl": "<string>",
  "finishedAt": "2023-11-07T05:31:56Z",
  "proxyUsedMb": "0",
  "proxyCost": "0",
  "browserCost": "0"
}

Authorizations

X-Browser-Use-API-Key
string
header
required

Path Parameters

session_id
string<uuid>
required

Body

application/json

Request model for updating browser session state.

action
enum<string>
required

The action to perform on the session

Available options:
stop

Response

Successful Response

View model for representing a browser session.

id
string<uuid>
required

Unique identifier for the session

status
enum<string>
required

Current status of the session (active/stopped)

Available options:
active,
stopped
timeoutAt
string<date-time>
required

Timestamp when the session will timeout

startedAt
string<date-time>
required

Timestamp when the session was created and started

liveUrl
string | null

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

cdpUrl
string | null

Chrome DevTools Protocol URL for browser automation

finishedAt
string<date-time> | null

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

proxyUsedMb
string
default:0

Amount of proxy data used in MB

proxyCost
string
default:0

Cost of proxy usage in USD

browserCost
string
default:0

Cost of browser session hosting in USD