List Session Messages
Return messages for a session with cursor-based pagination (chronological order).
GET
/
sessions
/
{session_id}
/
messages
List Session Messages
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v3/sessions/{session_id}/messages', 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/v3/sessions/{session_id}/messages \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v3/sessions/{session_id}/messages"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"data": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"type": "",
"summary": "",
"screenshotUrl": "<string>",
"hidden": false
}
],
"hasMore": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Query Parameters
Cursor: return messages after this message ID
Cursor: return messages before this message ID
Maximum number of messages to return (max 100).
Required range:
1 <= x <= 100Was this page helpful?
⌘I
List Session Messages
const options = {method: 'GET', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v3/sessions/{session_id}/messages', 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/v3/sessions/{session_id}/messages \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v3/sessions/{session_id}/messages"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"messages": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "<string>",
"data": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"type": "",
"summary": "",
"screenshotUrl": "<string>",
"hidden": false
}
],
"hasMore": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}