JavaScript
import { Hyperbrowser } from '@hyperbrowser/sdk';
const client = new Hyperbrowser({ apiKey: 'your-api-key' });
await client.sessions.list({
status: 'active'
});from hyperbrowser import Hyperbrowser
from hyperbrowser.models import SessionListParams
client = Hyperbrowser(api_key='your-api-key')
client.sessions.list(SessionListParams(
status='active'
))curl --request GET \
--url https://api.hyperbrowser.ai/api/sessions \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/api/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.hyperbrowser.ai/api/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.hyperbrowser.ai/api/sessions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbrowser.ai/api/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"sessions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startTime": "<string>",
"endTime": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"launchState": {
"useUltraStealth": true,
"useStealth": true,
"useProxy": true,
"solveCaptchas": true,
"solverType": "visual",
"adblock": true,
"trackers": true,
"annoyances": true,
"screen": {
"width": 1280,
"height": 720
},
"enableWebRecording": true,
"enableVideoWebRecording": true,
"enableLogCapture": true,
"acceptCookies": true,
"profile": {
"id": "<string>",
"persistChanges": true,
"persistNetworkCache": true
},
"staticIpId": "<string>",
"saveDownloads": true,
"enableWindowManager": true,
"enableWindowManagerTaskbar": true,
"viewOnlyLiveView": true,
"disablePasswordManager": true,
"enableAlwaysOpenPdfExternally": true,
"disablePostQuantumKeyAgreement": true
},
"creditsUsed": 123
}
],
"totalCount": 100,
"page": 1,
"pageSize": 10
}{
"message": "<string>"
}{
"message": "<string>"
}Sessions
Get list of sessions
GET
/
api
/
sessions
JavaScript
import { Hyperbrowser } from '@hyperbrowser/sdk';
const client = new Hyperbrowser({ apiKey: 'your-api-key' });
await client.sessions.list({
status: 'active'
});from hyperbrowser import Hyperbrowser
from hyperbrowser.models import SessionListParams
client = Hyperbrowser(api_key='your-api-key')
client.sessions.list(SessionListParams(
status='active'
))curl --request GET \
--url https://api.hyperbrowser.ai/api/sessions \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperbrowser.ai/api/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.hyperbrowser.ai/api/sessions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.hyperbrowser.ai/api/sessions")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperbrowser.ai/api/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"sessions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startTime": "<string>",
"endTime": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"launchState": {
"useUltraStealth": true,
"useStealth": true,
"useProxy": true,
"solveCaptchas": true,
"solverType": "visual",
"adblock": true,
"trackers": true,
"annoyances": true,
"screen": {
"width": 1280,
"height": 720
},
"enableWebRecording": true,
"enableVideoWebRecording": true,
"enableLogCapture": true,
"acceptCookies": true,
"profile": {
"id": "<string>",
"persistChanges": true,
"persistNetworkCache": true
},
"staticIpId": "<string>",
"saveDownloads": true,
"enableWindowManager": true,
"enableWindowManagerTaskbar": true,
"viewOnlyLiveView": true,
"disablePasswordManager": true,
"enableAlwaysOpenPdfExternally": true,
"disablePostQuantumKeyAgreement": true
},
"creditsUsed": 123
}
],
"totalCount": 100,
"page": 1,
"pageSize": 10
}{
"message": "<string>"
}{
"message": "<string>"
}Was this page helpful?
⌘I