Get Browser Session
Get detailed browser session information including status and URLs.
GET
/
browsers
/
{session_id}
Get Browser Session
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v4/browsers/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.browser-use.com/api/v4/browsers/{session_id} \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v4/browsers/{session_id}"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"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",
"agentSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recordingUrl": "<string>",
"recordingAvailable": true,
"metadata": {},
"extensions": []
}{
"detail": "Session not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Successful Response
View model for representing a browser session.
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.
Was this page helpful?
⌘I
Get Browser Session
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v4/browsers/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.browser-use.com/api/v4/browsers/{session_id} \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v4/browsers/{session_id}"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"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",
"agentSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recordingUrl": "<string>",
"recordingAvailable": true,
"metadata": {},
"extensions": []
}{
"detail": "Session not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}