# Browser API (/browser-api)

Browser API gives your script a remote browser named **RunHBrowser**. You create a *browser account* on the RunHarvester site, copy its `wss://` connection URL, and hand that URL to Puppeteer or Playwright (Node.js, Python, Java, or .NET). The browser runs on RunHarvester infrastructure and every request it makes leaves through a RunHarvester proxy, so the target site sees a proxy address and never the address of your machine or of RunHarvester itself.

```text
wss://<login>:<password>@browser.runharvester.com
```

Your script keeps its normal automation code. Pages, `goto`, `evaluate`, request interception, cookies, screenshots, and several tabs all work. See [Blocking policy](/browser-api/blocking-policy) for the few things that do not.

## How it fits together [#how-it-fits-together]

1. Create a browser account on the Browser API page of the dashboard. It issues a login and a password and shows the connection URL.
2. Optionally add modifiers to the login to choose an exit country, a proxy type, a persistent profile, a named session, or a customer proxy. See [Connection URL](/browser-api/connection-url).
3. Connect from your script. RunHarvester checks the account and balance, picks a route, starts a browser, and opens the WebSocket.
4. Traffic is metered per gigabyte and charged in portions while the session runs. See [Billing](/browser-api/billing).

Start with the [Quickstart](/browser-api/quickstart).

## Security model [#security-model]

- **The URL is a secret.** It contains the password. Credentials are accepted only from the HTTP `Authorization: Basic` header that Puppeteer and Playwright build from the URL; a URL with a query string (`?...`) is refused with HTTP 400. Treat the URL like an API key and keep it in an environment variable or secret store.
- **Wrong login and wrong password look the same.** Both answer `401 UNAUTHORIZED`, so a caller cannot probe which logins exist. Repeated wrong passwords lead to `429 RATE_LIMITED`.
- **The browser is isolated from private networks.** Requests to private, loopback, and link-local addresses are refused, and only ports 80 and 443 are reachable.
- **Dangerous browser commands are blocked.** Commands that would touch the host, such as downloads, file URLs, and browser-wide control, answer a `POLICY_BLOCKED` error. See [Blocking policy](/browser-api/blocking-policy).
- **Some site categories are never reachable.** A platform-wide blocklist covers government, banking, payments, crypto exchanges, and adult content. You can add your own allow and deny lists per account.
- **Proxy details stay private.** Browser API reports only the network class of a session (`datacenter`, `residential`, `own`, or `custom`), never which provider or route carried it.
- **The Live view never receives your secrets.** The CDP URL and password are not passed to it.
- **The session timeline is minimal.** Events show hosts only, never paths or query strings, and are kept for 30 days.

## Limits at a glance [#limits-at-a-glance]

| Limit | Value |
| --- | --- |
| Browser accounts per user | 10 |
| Concurrent sessions per account | 5 |
| Session length | 30 minutes |
| Reconnect window after a disconnect | 60 seconds |
| Profiles per account | up to 1000 (at least one is always kept) |
| Stored size of one profile | up to 50 MB |
| Live sessions per profile | 1 |
| Sticky exit-IP time (`ttl`) | 0 to 120 minutes |
| Largest WebSocket message | 8 MB |
| Reachable ports | 80 and 443 |

Support can raise limits for a user. Details on each limit are in [Profiles and sessions](/browser-api/profiles-and-sessions).

## Dashboard [#dashboard]

The Browser API page of the dashboard has these tabs:

| Tab | What it does |
| --- | --- |
| Accounts | Create browser accounts with a generated password or your own (16 to 64 letters and digits). Reveal the password and rotate it; both actions are audited. Set the account's defaults and its allow and deny lists. |
| Profiles | List and manage persistent profiles. **Generate URLs** creates up to 999 new profile URLs at once, with the country and proxy chosen once per batch. |
| Sessions | A timeline of running and past sessions with their events (hosts only, kept 30 days). **Kill** ends a running session. **Live view** lets you watch a running session and, by an explicit switch, take control of it. |
| Connection | The connection URL for your accounts, ready to copy. |
| Analytics | Usage analytics for your sessions. |
| Docs | Links to this documentation. |

The traffic rates for every network class are shown on the same page.

## Next steps [#next-steps]

- [Quickstart](/browser-api/quickstart): connect in five languages.
- [Connection URL](/browser-api/connection-url): every modifier and the priority rules.
- [Profiles and sessions](/browser-api/profiles-and-sessions): persistence, reconnect, and limits.
- [Blocking policy](/browser-api/blocking-policy): what is blocked and how it looks.
- [Captcha](/browser-api/captcha): automatic and manual solving.
- [Billing](/browser-api/billing): portions, classes, and balance behavior.
- [Errors and close codes](/browser-api/errors): handshake errors and WebSocket close codes.