Solari Browserdocs

Quickstart

Install the SDK, mint an API key, and drive a real browser in under a minute.

Install

npm install @solaribrowser/sdk

That's it — the SDK ships its own browser client. No Playwright or Patchright install needed.

Get an API key

Sign in at console.solaribrowser.com and create a key from the API Keys tab. Keys are shown once at creation time.

Treat keys as bearer credentials
A leaked key can run sessions and read every profile in your org. Rotate from the console if you suspect a leak.
export SOLARI_API_KEY="sb_live_…"

Open a session

launch() creates a fresh browser, hands you back an object with the standard Playwright API, and releases the session for you when you call close().

import { Solari } from "@solaribrowser/sdk"

const client = new Solari({
  apiKey: process.env.SOLARI_API_KEY!,
  // region: "us-west",   // default — see /regions for the full list
})

const browser = await client.launch()

const page = await browser.newPage()
await page.goto("https://example.com")
console.log(await page.title())

await browser.close()    // closes the browser AND releases the session

Drive the browser

Everything Playwright exposes is available on the page — navigation, locators, evaluation, screenshots, waits.

const browser = await client.launch()
const page = await browser.newPage()

// Navigate and wait for the network to settle.
await page.goto("https://news.ycombinator.com", { waitUntil: "networkidle" })

// Click and type with auto-waiting locators.
await page.locator("a:has-text('login')").click()
await page.locator("input[name=acct]").fill("demo-user")
await page.locator("input[name=pw]").fill("hunter2")

// Pull data out via evaluate.
const headlines = await page.locator(".titleline > a").allInnerTexts()

// Screenshot the whole page as PNG bytes.
const png = await page.screenshot({ fullPage: true })

await browser.close()

Or with explicit resource management

Node 22+ supports await using, which auto-closes the browser (and releases the session) when the variable goes out of scope — even on errors.

{
  await using browser = await client.launch({ stealth: true })
  const page = await browser.newPage()
  await page.goto("https://example.com")
  // browser closes here, automatically
}

Full kit

Combine stealth, a sticky residential proxy, captcha solving, and recording for the typical "scrape a defended site" shape.

const browser = await client.launch({
  stealth: true,
  recording: true,
  captcha: true,
  proxy: { country: "us", session: "warmup-1", sessionDuration: 10 },
})

const page = await browser.newPage()
await page.goto("https://example.com")

const sessionId = browser.id
await browser.close()

// Replay arrives a few seconds after close.
const { url } = await client.sessions.getReplayUrl(sessionId)
console.log("rrweb replay:", url)

Next