> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-reagan-eng-5397-make-docs-better-for-ag.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick start

> State-of-the-art AI browser automation with stealth browsers, CAPTCHA solving, residential proxies, and managed infrastructure.

## 1. Install

<CodeGroup>
  ```bash Python theme={null}
  pip install browser-use-sdk
  # In a managed environment (Debian/Docker "externally-managed-environment", PEP 668),
  # use a venv: python3 -m venv .venv && source .venv/bin/activate && pip install browser-use-sdk
  # or: uv pip install browser-use-sdk
  ```

  ```bash TypeScript theme={null}
  npm install browser-use-sdk
  ```
</CodeGroup>

Get a key at [cloud.browser-use.com/settings](https://cloud.browser-use.com/settings?tab=api-keys\&new=1), then:

```bash theme={null}
export BROWSER_USE_API_KEY=your_key
```

## 2. Run your first task

<CodeGroup>
  ```python Python theme={null}
  import asyncio
  from browser_use_sdk.v3 import AsyncBrowserUse

  async def main():
      client = AsyncBrowserUse()
      result = await client.run("List the top 20 posts on Hacker News today with their points")
      print(result.output)

  asyncio.run(main())
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v3";

  const client = new BrowserUse();
  const result = await client.run("List the top 20 posts on Hacker News today with their points");
  console.log(result.output);
  ```
</CodeGroup>

Want a full working app? Check out the [Chat UI example](/cloud/tutorials/chat-ui).

## 3. Or drive a browser yourself

Create a cloud browser, connect Playwright to it over CDP, and control it like a local browser, with stealth, CAPTCHA solving, and a residential proxy already on.

<CodeGroup>
  ```python Python theme={null}
  import asyncio
  from browser_use_sdk.v3 import AsyncBrowserUse
  from playwright.async_api import async_playwright

  async def main():
      client = AsyncBrowserUse()
      browser = await client.browsers.create()
      print(browser.cdp_url)   # CDP endpoint for Playwright/Puppeteer/Selenium
      print(browser.live_url)  # watch the session in a browser tab

      async with async_playwright() as p:
          pw = await p.chromium.connect_over_cdp(browser.cdp_url)
          page = pw.contexts[0].pages[0]
          await page.goto("https://news.ycombinator.com")
          titles = await page.locator(".titleline > a").all_inner_texts()
          print(titles[:5])
          await pw.close()

      await client.browsers.stop(browser.id)

  asyncio.run(main())
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v3";
  import { chromium } from "playwright";

  const client = new BrowserUse();
  const browser = await client.browsers.create();
  console.log(browser.cdpUrl);  // CDP endpoint for Playwright/Puppeteer/Selenium
  console.log(browser.liveUrl); // watch the session in a browser tab

  const pw = await chromium.connectOverCDP(browser.cdpUrl);
  const page = pw.contexts()[0].pages()[0];
  await page.goto("https://news.ycombinator.com");
  const titles = await page.locator(".titleline > a").allInnerTexts();
  console.log(titles.slice(0, 5));
  await pw.close();

  await client.browsers.stop(browser.id);
  ```
</CodeGroup>

Use `connect_over_cdp()` / `connectOverCDP()`, not `connect()`. See [Create a browser session](/cloud/browser/create) for every parameter and the response schema, and the [Playwright](/cloud/browser/playwright), [Puppeteer](/cloud/browser/puppeteer), and [Selenium](/cloud/browser/selenium) guides for framework specifics.

## Agent vs Browser

|                  | **Agent**                     | **Browser**         |
| ---------------- | ----------------------------- | ------------------- |
| **Method**       | `sessions.create()` / `run()` | `browsers.create()` |
| **What it does** | AI agent runs your task       | Raw browser via CDP |
| task             | ✓                             | —                   |
| model            | ✓                             | —                   |
| proxy            | ✓                             | ✓                   |
| custom\_proxy    | ✓                             | ✓                   |
| profile\_id      | ✓                             | ✓                   |
| recording        | ✓                             | ✓                   |
| workspace\_id    | ✓                             | —                   |
| keep\_alive      | ✓                             | —                   |
| screen size      | —                             | ✓                   |
| timeout          | —                             | ✓                   |

***

If you are an LLM, read/include [docs.browser-use.com/llms-full.txt](https://docs.browser-use.com/llms-full.txt) — it contains the complete SDK reference with all code examples in a single file optimized for LLMs. For a shorter index: [docs.browser-use.com/llms.txt](https://docs.browser-use.com/llms.txt).
