browser_list_contexts

Browser List Contexts

List all currently active browser contexts with their IDs, creation time, current URL, and state. Useful for managing multiple browser sessions and checking which contexts are still open.

Usage Example

CURL

POST `/api/execute/browser_list_contexts`

curl -X POST \
 -H "Authorization: Bearer <token>" \
 -H "Content-Type: application/json" \
 -d '{}' \
http://localhost:8080/api/execute/browser_list_contexts

Python SDK

import asyncio
from owl_browser import OwlBrowser, RemoteConfig

# Async usage
async with OwlBrowser(config) as browser:
    context = await browser.create_context()
    context_id = context["context_id"]
    await browser.list_contexts()

Node.js SDK

import { OwlBrowser } from '@olib-ai/owl-browser-sdk';

// Async usage
const ctx = await browser.createContext();
const contextId = ctx.context_id;
await browser.listContexts();

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}