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

# Proxies

> Residential proxies in 195+ countries. On by default.

A US residential proxy is active by default on every browser. To route through a different country, set `proxy_country_code`. See the [API reference](/cloud/api-v3/browsers/create-browser-session) for all supported country codes.

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

  client = AsyncBrowserUse()
  browser = await client.browsers.create(proxy_country_code="de")
  print(browser.cdp_url)   # ws://...
  print(browser.live_url)  # debug view

  # With an agent:
  # result = await client.run("Get the price of iPhone 16 on amazon.de", proxy_country_code="de")
  ```

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

  const client = new BrowserUse();
  const browser = await client.browsers.create({ proxyCountryCode: "de" });
  console.log(browser.cdpUrl);
  console.log(browser.liveUrl);

  // With an agent:
  // const result = await client.run("Get the price of iPhone 16 on amazon.de", { proxyCountryCode: "de" });
  ```
</CodeGroup>

## Disable proxies

If your use case does not need proxies, for example QA testing.

<CodeGroup>
  ```python Python theme={null}
  browser = await client.browsers.create(proxy_country_code=None)

  # With an agent:
  # result = await client.run("Go to http://localhost:3000", proxy_country_code=None)
  ```

  ```typescript TypeScript theme={null}
  const browser = await client.browsers.create({ proxyCountryCode: null });

  // With an agent:
  // const result = await client.run("Go to http://localhost:3000", { proxyCountryCode: null });
  ```
</CodeGroup>

## Custom proxy

Bring your own proxy server (HTTP or SOCKS5).

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

  client = AsyncBrowserUse()
  browser = await client.browsers.create(
      custom_proxy={
          "host": "proxy.example.com",
          "port": 8080,
          "username": "user",
          "password": "pass",
      },
  )
  ```

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

  const client = new BrowserUse();
  const browser = await client.browsers.create({
    customProxy: {
      host: "proxy.example.com",
      port: 8080,
      username: "user",
      password: "pass",
    },
  });
  ```
</CodeGroup>

## Blocked? Get a fresh IP

Browser Use does not rotate the IP within a running session. When a site starts blocking you, stop the session and create a new one — each session gets a fresh residential IP from the country pool automatically.

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

  client = AsyncBrowserUse()

  async def with_fresh_ip(country="us", profile_id=None):
      # Stop-and-recreate is how you get a new IP; reattach a profile to keep login state.
      browser = await client.browsers.create(proxy_country_code=country, profile_id=profile_id)
      return browser
  ```

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

  const client = new BrowserUse();

  async function withFreshIp(country = "us", profileId?: string) {
    // Stop-and-recreate is how you get a new IP; reattach a profile to keep login state.
    return client.browsers.create({ proxyCountryCode: country, profileId });
  }
  ```
</CodeGroup>

* **New session = new IP.** Recreating the browser is the supported way to rotate.
* **Keep your login across the rotation** by passing the same [`profile_id`](/cloud/guides/authentication) — the fresh IP loads the saved cookies and localStorage.
* **Switch country** (`proxy_country_code`) to leave a blocked regional pool entirely.
* **Custom proxies** can rotate per request on their side — use the `custom_proxy` config above with a rotating endpoint.

## Further reading

* [We stealth benchmarked every major cloud browser provider](https://browser-use.com/posts/stealth-benchmark) — how proxy quality affects bypass rates
