> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-cursor-proxy-indicator-and-text-6cda.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Direct Browser (Playwright)

> Connect Playwright to a cloud browser via CDP for full programmatic control.

Need lower-level control than an agent task? Create a cloud browser and connect directly via Chrome DevTools Protocol (CDP). You get a stealth browser with residential proxy — use it with Playwright, Puppeteer, or any CDP client.

When to use this:

* 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

```python theme={null}
from playwright.async_api import async_playwright
from browser_use_sdk import AsyncBrowserUse

client = AsyncBrowserUse()
browser = await client.browsers.create(proxy_country_code="us")

async with async_playwright() as p:
    b = await p.chromium.connect_over_cdp(browser.cdp_url)
    page = b.contexts[0].pages[0]
    await page.goto("https://example.com")
    await page.screenshot(path="screenshot.png")
    await b.close()

await client.browsers.stop(browser.id)
```

See [Browser Infrastructure](/cloud/guides/browser-api) for the full browser API and [Pricing](/cloud/pricing) for browser session costs.
