> ## 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.

# World Region Configuration for ZenRows Scraping Browser

> Set up world region targeting to route your ZenRows Scraping Browser requests via residential IPs for location-specific web scraping.

ZenRows Scraping Browser empowers you to target specific regions of the world for your web scraping operations, unlocking geo-restricted content and enabling region-specific data collection. This guide shows you how to configure world region targeting using both the ZenRows SDK (recommended) and direct WebSocket connections.

## What is World Region Targeting?

World region targeting routes your scraping requests through residential IPs from a chosen geographic area. This is crucial when websites display different content, pricing, or availability based on visitor location.

**Typical use cases:**

* Accessing geo-locked content or services
* Price comparison across markets
* Testing website localization and UX
* Circumventing geo-blocks for data gathering
* Ad verification in multiple regions

<Note>
  Auto-rotate and Residential IPs are pre-configured and enabled by default for all ZenRows Scraping Browser users, ensuring optimal performance and reliability.
</Note>

## How to Configure World Region

You can configure world region targeting in two ways:

* **ZenRows SDK:** Easiest and most robust option for most users
* **Direct WebSocket URL:** For advanced or custom integrations

<Tabs>
  <Tab title="Puppeteer">
    Specify the region in the WebSocket URL with the `proxy_region` parameter:

    ```bash theme={null}
    wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_region=eu
    ```

    **Examples:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      const puppeteer = require('puppeteer-core');
      const connectionURL = 'wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_region=eu';

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

      ```python Python theme={null}
      import asyncio
      from pyppeteer import connect

      async def main():
          ws_url = 'wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_region=eu'
          browser = await connect(browserWSEndpoint=ws_url)
          page = await browser.newPage()
          await page.goto('https://example.com')
          print(await page.title())
          await browser.close()

      asyncio.get_event_loop().run_until_complete(main())
      ```
    </CodeGroup>

    **Available Region Codes:**

    * `eu` - Europe
    * `na` - North America
    * `ap` - Asia Pacific
    * `sa` - South America
    * `af` - Africa
    * `me` - Middle East
  </Tab>

  <Tab title="Playwright">
    Specify the region in the WebSocket URL with the `proxy_region` parameter:

    ```bash theme={null}
    wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_region=eu
    ```

    **Examples:**

    <CodeGroup>
      ```javascript Node.js theme={null}
      const { chromium } = require('playwright');

      (async () => {
          const browser = await chromium.connectOverCDP('wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_region=eu');
          const page = await browser.newPage();
          await page.goto('https://example.com');
          console.log(await page.title());
          await browser.close();
      })();
      ```

      ```python Python theme={null}
      import asyncio
      from playwright.async_api import async_playwright

      async def main():
          async with async_playwright() as p:
              browser = await p.chromium.connect_over_cdp('wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY&proxy_region=eu')
              page = await browser.new_page()
              await page.goto('https://example.com')
              print(await page.title())
              await browser.close()

      asyncio.run(main())
      ```
    </CodeGroup>

    **Available Region Codes:**

    * `eu` - Europe
    * `na` - North America
    * `ap` - Asia Pacific
    * `sa` - South America
    * `af` - Africa
    * `me` - Middle East
  </Tab>

  <Tab title="ZenRows SDK">
    The ZenRows SDK makes region configuration simple and manages connections automatically. Recommended for most users.

    <CodeGroup>
      ```javascript Node.js Puppeteer theme={null}
      const { ZenRowsBrowser, ProxyRegion } = require('zenrows');

      (async () => {
          const browser = await ZenRowsBrowser.puppeteer({
              apiKey: 'YOUR_ZENROWS_API_KEY',
              proxyRegion: ProxyRegion.Europe // or .NorthAmerica, .AsiaPacific, etc.
          });
          const page = await browser.newPage();
          await page.goto('https://example.com');
          console.log(await page.title());
          await browser.close();
      })();
      ```

      ```javascript Node.js Playwright theme={null}
      const { ZenRowsBrowser, ProxyRegion } = require('zenrows');

      (async () => {
          const browser = await ZenRowsBrowser.playwright({
              apiKey: 'YOUR_ZENROWS_API_KEY',
              proxyRegion: ProxyRegion.Europe // or .NorthAmerica, .AsiaPacific, etc.
          });
          const page = await browser.newPage();
          await page.goto('https://example.com');
          console.log(await page.title());
          await browser.close();
      })();
      ```
    </CodeGroup>

    **Available SDK Region Options:**

    * `ProxyRegion.Europe` - European residential IPs
    * `ProxyRegion.NorthAmerica` - North American residential IPs
    * `ProxyRegion.AsiaPacific` - Asia-Pacific residential IPs
    * `ProxyRegion.SouthAmerica` - South American residential IPs
    * `ProxyRegion.Africa` - African residential IPs
    * `ProxyRegion.MiddleEast` - Middle Eastern residential IPs
  </Tab>
</Tabs>

<Frame>
  <img src="https://static.zenrows.com/content/res_proxy_world_region_c2e2c74f62.png" style={{ borderRadius: '0.5rem' }} alt="World Region Configuration Interface" />
</Frame>

## Best Practices

**Choosing the Right Region:**

* Select the region closest to your target audience or where the content is most relevant
* Consider local time zones and business hours for time-sensitive scraping

**SDK vs Direct Connection:**

* Use the SDK for most projects (better error handling and connection management)
* Use direct WebSocket only for fine-grained control or custom framework integration

**Testing and Validation:**

* Test your region config with a simple request to verify IP location
* Monitor scraping results to ensure you're seeing expected regional content

## Troubleshooting

**Common Issues:**

* **Invalid region code:** Double-check you're using the correct region codes
* **No regional content difference:** Some sites may not vary by region. Verify with manual testing
* **Connection timeouts:** Proxy pools may vary by region; try another if needed

**Debugging Tips:**

* Use browser dev tools to inspect the IP address
* Test the same URL from different regions to confirm content variation
* Check ZenRows dashboard for logs and error details

<Tip>
  For more granular targeting, see [Country Targeting](/scraping-browser/features/country).
</Tip>

## Next Steps

* Learn about [Country Targeting](/scraping-browser/features/country) for precision
* Explore [Session TTL Configuration](/scraping-browser/features/session-ttl) to manage session duration
* See the <a href="https://github.com/ZenRows/browser-js-sdk" target="_blank" rel="noopener noreferrer nofollow">ZenRows SDK Repository</a> for advanced features and examples
* Review the [Practical Use Cases](/scraping-browser/help/practical-use-cases) for real world examples
