Skip to main content

Overview

The Browser API provides remote browser automation via Chrome DevTools Protocol (CDP). Connect using Playwright, Puppeteer, or any CDP-compatible client to automate web interactions in isolated browser environments.
Browsers auto-terminate after 5 minutes of inactivity.

Authentication

Set your API key as an environment variable:

Quick Start

Create a browser session, connect via CDP, and clean up:

Endpoints

WebSocket Connection (CDP)

Connect to the browser via Chrome DevTools Protocol:
The WebSocket URL uses token as a query parameter for authentication, not the Authorization header.

Examples

Once connected via CDP, you have full browser automation capabilities. Here are common operations:

Take a Screenshot

Execute JavaScript

Extract Page Content

Interact with Elements

For more Playwright operations, see the Playwright documentation.

Rate Limits

Always delete browser sessions when done. Sessions count toward your concurrent limit (10) and will block new session creation if the limit is reached. Sessions auto-terminate after 5 minutes of inactivity, but manual cleanup is recommended.

Pricing

Browser sessions are billed based on compute time usage.
Usage Calculation: Billing is calculated based on the total time your browser session is active, rounded up to the nearest minute. For example, a session running for 1 minute and 15 seconds will be billed for 2 minutes ($0.0083).See detailed pricing information and cost examples for all Perplexity APIs on our Pricing page.

Contact Sales

Get in touch with our team to discuss enterprise pricing and custom requirements.

Error Codes

Next Steps

Browser API Reference

Complete API documentation for browser endpoints.