Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.reader.dev/llms.txt

Use this file to discover all available pages before exploring further.

browser(options?)

Launch a stealthed browser session and return a CDP WebSocket URL.
const session = await reader.browser(options?): Promise<BrowserSession>

BrowserOptions

OptionTypeDefaultDescription
proxyProxyConfig-Proxy to route browser traffic through
proxyTierProxyTier-Use a proxy from the configured pool tier
showChromebooleanfalseShow the browser window
timeoutMsnumber300000Session lifetime in ms (auto-closes after)
verbosebooleanfalseEnable verbose logging

BrowserSession

interface BrowserSession {
  /** Unique session identifier */
  sessionId: string;

  /** CDP WebSocket URL for Playwright/Puppeteer */
  wsEndpoint: string;

  /** ISO 8601 timestamp of session creation */
  createdAt: string;

  /** Close the session and release all resources */
  close(): Promise<void>;
}

Examples

Basic

const session = await reader.browser();
console.log(session.wsEndpoint);
// ws://127.0.0.1:PORT/devtools/browser/UUID

await session.close();

With Proxy

const session = await reader.browser({
  proxy: { url: "http://user:pass@proxy:8080" },
});

With Timeout

const session = await reader.browser({
  timeoutMs: 600_000, // 10 minutes
});

Show Browser Window

const session = await reader.browser({
  showChrome: true,
});