> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Browser Sessions

> Learn what Zenrows Browser Sessions offers for dynamic website scraping, including residential proxy rotation, geo-targeting, and CDP support.

Zenrows' Browser Sessions (formerly, Scraping Browser) is the perfect solution for effortlessly extracting data from dynamic websites, especially if you're already using tools like Puppeteer or Playwright. **With just one line of code, you can integrate Browser Sessions into your existing setup** and immediately benefit from our vast network of over 55 million residential IPs across 190+ countries, offering 99.9% uptime for uninterrupted scraping.

Whether you're dealing with complex JavaScript content or interacting with web elements, Zenrows makes it easy to scrape without worrying about managing proxies or handling dynamic user interactions.

## Ideal for Puppeteer and Playwright Users

If you already have web scraping code using [Puppeteer](https://www.zenrows.com/blog/puppeteer-web-scraping) or [Playwright](https://www.zenrows.com/blog/playwright-scraping), integrating Zenrows' Browser Sessions is incredibly simple.

By adding just one line, you can unlock the power of our residential proxy network and browser simulation, without needing to rewrite your entire scraping logic. Zenrows enhances your scraping capabilities with minimal effort:

```bash Browser URL theme={null}
wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY
```

This integration ensures that your existing scraping operations become more robust, efficient, and scalable.

## Key Advantages

Browser Sessions goes beyond traditional scraping techniques, offering solutions for the most challenging web scraping tasks:

* **One Line of Code:** Start scraping instantly with Zenrows' Browser Sessions. No complicated setup. Just a simple API call that does all the heavy lifting for you.
* **Dynamic Web Content Extraction:** Many websites rely on JavaScript to display content dynamically. Browser Sessions simulates a real user session, allowing you to extract data even from single-page applications (SPAs) or websites that load content asynchronously.
* **Handling User Interactions:** Simulate user actions like clicking, scrolling, or waiting for elements to load, all while avoiding IP blocks and ensuring the data is extracted seamlessly.
* **Geolocation Targeting:** Access localized content by selecting from millions of IPs across 190+ countries, bypassing geo-restrictions to scrape the data you need.
* **IP Auto-Rotation:** Rotate IPs with every request to avoid bans and blocks, ensuring your scraping remains undetected.

## Parameter Overview

Customize your Browser Sessions requests using the following parameters:

| PARAMETER                                                                            | TYPE     | DEFAULT                                                              | DESCRIPTION                                                                                                                    |
| ------------------------------------------------------------------------------------ | -------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **apikey** `required`                                                                | `string` | [**Get Your Free API Key**](https://app.zenrows.com/register?p=free) | Your unique API key for authentication                                                                                         |
| [**proxy\_region**](https://docs.zenrows.com/browser-sessions/features/world-region) | `string` | `global`                                                             | Focus your scraping on a specific geographic region (e.g., eu for Europe). **When set to global, no parameter is needed**.     |
| [**proxy\_country**](https://docs.zenrows.com/browser-sessions/features/country)     | `string` |                                                                      | Target a specific country for geo-restricted data (e.g., `es` for Spain). Available only when `proxy_region` is set to global. |
| [**session\_ttl**](https://docs.zenrows.com/browser-sessions/features/session-ttl)   | `number` | `180`                                                                | The time to live for the browser session, in seconds. Minimum: 60, Maximum: 900 (1-15 minutes). Defaults to 3 minutes.         |

## Pricing

Browser Sessions bill in credits, on the same shared balance as every other Zenrows product. Bandwidth is metered at a flat **25,000 credits per GB** on every plan, plus a flat **5 credits per minute** of session time.

**With Zenrows, you only pay for the data and time you use**, and the Free plan (5,000 credits/month, no credit card required) lets you try it at no cost. Explore our flexible plans and find more details on our [pricing page](/first-steps/pricing).

## Tips for Optimal Performance

1. **Manage Session Duration**: Keep session durations as short as possible since session time is billed by the minute.

2. **Reuse Browser Sessions**: For multiple operations on the same site, reuse the browser session rather than creating a new one each time.

3. **Use Proper Page Closure**: Always close pages when done to free up resources:
   ```javascript theme={null}
   // Close individual pages when done
   await page.close();
   ```

4. **Set Reasonable Timeouts**: Use appropriate timeouts for your operations to prevent long-running sessions:
   ```javascript theme={null}
   // Set navigation timeout
   await page.goto(url, { timeout: 30000 });

   // Set selector timeout
   await page.waitForSelector('.element', { timeout: 15000 });
   ```

5. **Optimize Resource Usage**: Block unnecessary resources when they're not needed:
   ```javascript theme={null}
   // Block images, fonts, etc.
   await page.setRequestInterception(true);
   page.on('request', (request) => {
     if (request.resourceType() === 'image' || request.resourceType() === 'font') {
       request.abort();
     } else {
       request.continue();
     }
   });
   ```

6. **Target Specific Countries Wisely**: Only specify a country when needed for your use case, as more specific targeting might have different success rates.
