> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-larsen-v1-unified-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxies

> Residential proxies in 195+ countries, on by default. Set a country, disable, or bring your own.

Every browser routes through a **US residential proxy by default** — no setup. Change the country, turn it off, or supply your own proxy. Proxy settings go on the `browser` object of a run, or on a standalone browser.

## Set the country

Pass a two-letter country code as `proxy_country_code`.

<CodeGroup>
  ```python Python theme={null}
  from browser_use import BrowserUse

  client = BrowserUse()

  # on an agent run
  run = client.agents.browser_use.run(
      task="Get the price of the iPhone 16 on amazon.de",
      browser={"proxy_country_code": "de"},
  )

  # or on a standalone browser
  browser = client.browsers.create(proxy_country_code="de")
  ```

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

  const client = new BrowserUse();

  const run = await client.agents.browserUse.run({
    task: "Get the price of the iPhone 16 on amazon.de",
    browser: { proxy_country_code: "de" },
  });

  const browser = await client.browsers.create({ proxy_country_code: "de" });
  ```

  ```bash curl theme={null}
  curl -X POST https://api.browser-use.com/api/v1/agents/browser-use/runs \
    -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"task": "Get the iPhone 16 price on amazon.de", "browser": {"proxy_country_code": "de"}}'
  ```
</CodeGroup>

195+ countries are supported. Common codes: `us`, `gb`, `de`, `fr`, `jp`, `br`, `in`, `au`, `ca`. See [Geo-scraping](/cloud/browser/geo-scraping) for region-locked content.

## Disable the proxy

For local targets or QA where you don't need one, set it to `null`.

<CodeGroup>
  ```python Python theme={null}
  run = client.agents.browser_use.run(
      task="Go to http://localhost:3000 and check the page loads",
      browser={"proxy_country_code": None},
  )
  ```

  ```typescript TypeScript theme={null}
  const run = await client.agents.browserUse.run({
    task: "Go to http://localhost:3000 and check the page loads",
    browser: { proxy_country_code: null },
  });
  ```

  ```bash curl theme={null}
  curl -X POST https://api.browser-use.com/api/v1/agents/browser-use/runs \
    -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"task": "Check http://localhost:3000 loads", "browser": {"proxy_country_code": null}}'
  ```
</CodeGroup>

## Blocked? Get a fresh IP

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

<CodeGroup>
  ```python Python theme={null}
  from browser_use import BrowserUse

  client = BrowserUse()

  # Stop-and-recreate is how you get a new IP; reattach a profile to keep login state.
  client.browsers.stop(old_browser.id)
  browser = client.browsers.create(proxy_country_code="us", browser_profile_id="bp_123")
  ```

  ```bash curl theme={null}
  curl -X POST https://api.browser-use.com/api/v1/browsers/br_old/stop \
    -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY"

  curl -X POST https://api.browser-use.com/api/v1/browsers \
    -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"proxy_country_code": "us", "browser_profile_id": "bp_123"}'
  ```
</CodeGroup>

* **New browser = new IP.** Recreating the browser is the supported way to rotate.
* **Keep your login across the rotation** by passing the same [`browser_profile_id`](/cloud/use-a-profile) — 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 a [custom proxy](/cloud/browser/custom-proxy) with a rotating endpoint.

## Next

<CardGroup cols={2}>
  <Card title="Geo-scraping" href="/cloud/browser/geo-scraping" icon="earth-americas">
    Route through a country to see region-locked prices, catalogs, and content.
  </Card>

  <Card title="Custom proxy" href="/cloud/browser/custom-proxy" icon="server">
    Bring your own HTTP or SOCKS5 proxy.
  </Card>
</CardGroup>

## Further reading

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