- You have existing Playwright scripts and want to run them on stealth infrastructure
- You need pixel-perfect control (screenshots, specific click coordinates, form filling)
- You want to combine agent tasks with manual browser automation
Option 1: WebSocket URL (no SDK)
Connect with a single URL. All configuration is passed as query parameters.Query parameters
Option 2: SDK
Create a browser via the SDK, get acdp_url, and connect. The SDK also gives you a live_url to watch or embed the session.
Create response
browsers.create() wraps POST https://api.browser-use.com/api/v3/browsers, which returns 201 with:
cdpUrl, liveUrl) and snake_case in the Python SDK (cdp_url, live_url). cdpUrl and liveUrl are nullable — check them before connecting.
Stopping a session over REST
There is noPOST /browsers/{id}/stop endpoint. Stopping is an update:
Gotchas
Use
connect_over_cdp() / connectOverCDP(), not connect(). Playwright’s connect() expects a Playwright-protocol server and fails against a CDP endpoint with an opaque Protocol error (Browser.getVersion).- Reuse the existing context. The session already has a context and page open — use
browser.contexts[0].pages[0]instead ofbrowser.new_context(), so you keep the stealth fingerprint and any loaded profile. - Closing the connection vs stopping the session. With the WebSocket URL, disconnecting stops the browser. With the SDK,
pw_browser.close()only disconnects your client — callclient.browsers.stop(browser.id)to end the session.
See also
- Puppeteer and Selenium connections
- Live preview & recording — watch the session or embed it in your app
- Proxies and stealth configuration