Get Session
Get detailed session information including status, URLs, and task details.
GET
/
sessions
/
{session_id}
Get Session
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v2/sessions/{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/v2/sessions/{session_id} \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v2/sessions/{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",
"startedAt": "2023-11-07T05:31:56Z",
"tasks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"llm": "<string>",
"task": "<string>",
"status": "created",
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"output": "<string>",
"browserUseVersion": "<string>",
"isSuccess": true,
"judgement": "<string>",
"judgeVerdict": true,
"cost": "<string>",
"suggestions": [
{}
]
}
],
"liveUrl": "<string>",
"recordingUrl": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"publicShareUrl": "<string>",
"persistMemory": true,
"keepAlive": true,
"proxyUsedMb": "0",
"proxyCost": "0"
}{
"detail": "Session not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Response
Successful Response
View model for representing a (browser) session with its associated tasks.
Was this page helpful?
⌘I
Get Session
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v2/sessions/{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/v2/sessions/{session_id} \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v2/sessions/{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",
"startedAt": "2023-11-07T05:31:56Z",
"tasks": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"llm": "<string>",
"task": "<string>",
"status": "created",
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"metadata": {},
"output": "<string>",
"browserUseVersion": "<string>",
"isSuccess": true,
"judgement": "<string>",
"judgeVerdict": true,
"cost": "<string>",
"suggestions": [
{}
]
}
],
"liveUrl": "<string>",
"recordingUrl": "<string>",
"finishedAt": "2023-11-07T05:31:56Z",
"publicShareUrl": "<string>",
"persistMemory": true,
"keepAlive": true,
"proxyUsedMb": "0",
"proxyCost": "0"
}{
"detail": "Session not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}