For AI agents: a documentation index is available at /llms.txt
Skip to main content

BAP

Browser Automation Protocol (BAP) is Browserless's automation layer on top of BrowserQL: managed stealth, residential proxies, CAPTCHA solving, and live debugging URLs, driven through a typed, Puppeteer- or Playwright-shaped API instead of hand-written GraphQL. Pick a language below, or send BQL documents directly if you don't want an SDK in the loop.

Which one should I use?

Reach for the TypeScript or Python SDK first: you get autocomplete, typed options and responses, and method names that match Puppeteer and Playwright respectively, so a mismatched argument fails at the call site instead of silently sending the wrong GraphQL variable.

Use BrowserQL directly when you're not writing TypeScript or Python, want to generate BQL documents from another tool, or are working in the hosted IDE. Every BAP method is a thin wrapper over a BQL mutation, so anything BAP can do, BQL can do too.

Already have Puppeteer or Playwright code you don't want to rewrite? None of these three wrap BQL: connect to Browsers as a Service over CDP instead, if you don't need BQL's managed stealth, proxying, or CAPTCHA solving.

FAQ & Troubleshooting

What's the difference between BAP and BrowserQL?

BrowserQL (BQL) is the GraphQL protocol. BAP is a typed SDK, in TypeScript or Python, built on top of it. Every BAP method sends a BQL mutation under the hood, so anything you can do with BAP, you can do with BQL directly, and vice versa.

Which language should I pick if I don't have a preference?

Either is fully supported and generated from the same BrowserQL schema, so pick whichever matches the rest of your stack. There's no feature gap between the two SDKs.

Was this page helpful?