Skip to main content

Understanding Browser Sessions

A browser session is the fundamental building block in Browserbase - it represents a single browser instance running in the cloud. Before diving into the APIs, we recommend familiarizing yourself with the core concepts:

Create a Browser Session

Learn how to create and configure browser sessions

Using Browser Sessions

Connect and interact with browser sessions using your preferred framework

Managing Sessions

Understand session lifecycle and proper termination

Session Inspector

Monitor and debug your browser sessions in real-time

API Reference

Once you understand the fundamentals, explore our APIs to get full control of your browser sessions:

Sessions API

Create and manage browser sessions with full programmatic control.

Projects API

View project wide usage.

Contexts API

Configure and reuse browser environments across multiple sessions.
Authentication All REST endpoints are authenticated using your Browserbase API Key, configured as follows:
const response = await fetch(
  `https://api.browserbase.com/v1/sessions/${sessionId}`,
  {
    method: "GET",
    headers: {
      "x-bb-api-key": `${process.env.BROWSERBASE_API_KEY}`,
    },
  },
);