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:- macOS/Linux
- Windows
Quick Start
Create a browser session, connect via CDP, and clean up:Response
Response
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
Navigate and Get Page Info
Execute JavaScript
Navigation Controls
Extract Page Content
Interact with Elements
Rate Limits
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.