Get Session
curl --request GET \
--url https://api.example.com/browser/sessions/{id}import requests
url = "https://api.example.com/browser/sessions/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/browser/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/browser/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/browser/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/browser/sessions/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"cdpUrl": "<string>",
"liveViewUrl": "<string>",
"capabilities": [
"<string>"
],
"extensions": [
"<string>"
],
"proxy": {},
"createdAt": 123,
"expiresAt": 123,
"pages": [
{}
]
}Sessions
Get Session
Get the full details of a single browser session, including open pages.
GET
/
browser
/
sessions
/
{id}
Get Session
curl --request GET \
--url https://api.example.com/browser/sessions/{id}import requests
url = "https://api.example.com/browser/sessions/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/browser/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/browser/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/browser/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/browser/sessions/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/browser/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"cdpUrl": "<string>",
"liveViewUrl": "<string>",
"capabilities": [
"<string>"
],
"extensions": [
"<string>"
],
"proxy": {},
"createdAt": 123,
"expiresAt": 123,
"pages": [
{}
]
}Overview
Returns the full session record, including the current list of open pages (URL + title). Use this to re-fetchcdpUrl / liveViewUrl if the client misplaced them.
Path Parameters
string
required
Browser session ID (UUID). Create via
POST /browser/sessions.Example Request
curl -X GET "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7" \
-H "Authorization: Bearer $SCRAPENGINE_API_KEY"
Response
Success Response (200)
Same shape as thePOST /browser/sessions response, with an additional pages field.
string
Session ID (UUID).
string
Current session state.
string
Chrome DevTools Protocol WebSocket URL.
string
Shareable live-view URL.
string[]
Enabled capabilities.
string[]
Loaded extension IDs.
object
Managed proxy info —
enabled, provider, location, sticky.integer
Unix epoch ms when the session was created.
integer
Unix epoch ms when the session auto-expires.
object[]
Array of
{ url, title } for currently-open tabs.{
"id": "baa3f390-fa6e-4a24-b84a-a575a5f3a9c7",
"status": "ready",
"cdpUrl": "wss://cdp.scrapengine.io/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7",
"liveViewUrl": "https://live.scrapengine.io/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7",
"capabilities": ["stealth"],
"extensions": [],
"createdAt": 1714000000000,
"expiresAt": 1714001800000,
"pages": [
{ "url": "https://example.com/", "title": "Example Domain" }
]
}
Error Responses
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing API key. |
404 | Session not found or not owned by the caller. |
Was this page helpful?