# Headless Browser

Headless Browser allows you to run and control remote headless browsing experience without the complexity of managing them locally or on your own infrastructure. It provides a seamless way to execute browser-based automation, testing, and web scraping without dealing with browser setup, resource constraints, or detection challenges.&#x20;

### Supported Libraries

Headless Browser works with any library that supports the **Chrome DevTools Protocol (CDP)**. This includes:

* [Playwright](https://playwright.dev/) (for Firefox, supported Playwright versions are 1.51 and 1.56)
* [Puppeteer](https://pptr.dev/)
* Other CDP-compatible automation frameworks

### Browser Options

Headless Browser offers two specialized browser environments:

* [Firefox-based browser](https://developers.oxylabs.io/scraping-solutions/headless-browser/firefox) – advanced stealth-focused Firefox implementation with built-in anti-detection features and automatic residential proxy integration.
* [Chrome-based browser](https://developers.oxylabs.io/scraping-solutions/headless-browser/chrome) – high-performance remote browsers running on dedicated servers with residential proxies

Additionally, Headless Browser allows two location-related functionalities:

* Performance optimization for the US-based users
* Geo-location parameters for country-level targeting.

### **Rate Limits**

Each has **100 concurrent sessions** and can launch up to **10 sessions per second for each browser** (Chrome and Firefox). This ensures service stability and performance.

To request a higher limit for your account, contact Oxylabs Customer Support via [live chat](https://oxylabs.drift.click/oxybot) or [email](mailto:support@oxylabs.io).

### Quick Start Examples

{% tabs %}
{% tab title="Python" %}

```python
from playwright.sync_api import sync_playwright

username = "your-username"
password = "your-password"
endpoint = "ubc.oxylabs.io"
browser_url = f"wss://{username}:{password}@{endpoint}"

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(browser_url)
    page = browser.new_page()
    page.goto('https://example.com')
    print(page.title())
    browser.close()
```

{% endtab %}

{% tab title="JavaScript (Playwright)" %}

```javascript
import { chromium } from 'playwright';

(async () => {
    const username = 'your-username';
    const password = 'your-password';
    const endpoint = 'ubc.oxylabs.io';
    const browserUrl = `wss://${username}:${password}@${endpoint}`;

    const browser = await chromium.connectOverCDP(browserUrl);
    const page = await browser.newPage();
    await page.goto('https://example.com');
    console.log(await page.title());
    await browser.close();
})();
```

{% endtab %}

{% tab title="JavaScript (Puppeteer)" %}

```javascript
import puppeteer from 'puppeteer';

(async () => {
  const username = 'your-username';
  const password = 'your-password';
  const endpoint = 'ubc.oxylabs.io';
  const browserUrl = `wss://${username}:${password}@${endpoint}`;

  const browser = await puppeteer.connect({
    browserWSEndpoint: browserUrl
  });
  const page = await browser.newPage();
  await page.goto('https://example.com');
  console.log(await page.title());
  await browser.close();
})();
```

{% endtab %}
{% endtabs %}

See the browser-specific documentation for detailed configuration options:

* [Firefox-based browser](https://developers.oxylabs.io/scraping-solutions/headless-browser/firefox)
* [Chrome-based browser](https://developers.oxylabs.io/scraping-solutions/headless-browser/chrome)
