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

# Proxies

> Route Fetch requests through Browserbase's proxy network and target a location.

Fetch sends requests directly by default. Enable Browserbase's proxy network to route requests through a different IP address when a site blocks direct requests, or choose a location to retrieve region-specific content and pricing.

## Using proxies

If a site blocks your request or returns a `403` status code, set `proxies: true`.

**Node.js**

```typescript Node.js theme={null}
const response = await bb.fetchAPI.create({
  url: "https://httpbin.org/",
  proxies: true,
});
```

**Python**

```python Python theme={null}
response = bb.fetch_api.create(url="https://httpbin.org/", proxies=True)
```

**cURL**

```bash cURL theme={null}
curl -X POST https://api.browserbase.com/v1/fetch \
  -H "Content-Type: application/json" \
  -H "X-BB-API-Key: $BROWSERBASE_API_KEY" \
  -d '{"url": "https://httpbin.org/", "proxies": true}'
```

> [!NOTE]
>
> Enabling proxies may increase response time. If speed is critical and the target site doesn't require a proxy, leave this disabled.

### Targeting a geolocation

To route the request from a specific location, pass `proxies` as an object with a `geolocation`. This is useful for fetching region-specific content or pricing. Omit `geolocation` (or set `proxies: true`) to use the default exit location.

**Node.js**

```typescript Node.js theme={null}
const response = await bb.fetchAPI.create({
  url: "https://httpbin.org/",
  proxies: {
    geolocation: {
      country: "US",
      state: "NY",
      city: "New York",
    },
  },
});
```

**Python**

```python Python theme={null}
response = bb.fetch_api.create(
    url="https://httpbin.org/",
    proxies={
        "geolocation": {
            "country": "US",
            "state": "NY",
            "city": "New York",
        },
    },
)
```

**cURL**

```bash cURL theme={null}
curl -X POST https://api.browserbase.com/v1/fetch \
  -H "Content-Type: application/json" \
  -H "X-BB-API-Key: $BROWSERBASE_API_KEY" \
  -d '{
    "url": "https://httpbin.org/",
    "proxies": {
      "geolocation": {
        "country": "US",
        "state": "NY",
        "city": "New York"
      }
    }
  }'
```

The `geolocation` object accepts:

| Field | Type | Required | Description |
| - | - | - | - |
| `country` | `string` | **required** | Country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (2 letters, e.g. `US`). |
| `state` | `string` | optional | US state code (2 letters, e.g. `NY`). Only valid when `country` is `US`. |
| `city` | `string` | optional | City name. Use spaces for multi-word names (e.g. `New York`). |

> [!NOTE]
>
> Unlike [browser sessions](https://docs.browserbase.com/platform/identity/proxies.md), Fetch supports a single Browserbase-managed proxy configuration only. Custom (bring-your-own) proxies and per-domain proxy rules aren't available on Fetch.

> **[Authenticated Fetch](https://docs.browserbase.com/platform/fetch/authenticated-fetch.md)**
>
> Fetch pages that require a login with saved browser session state.

> **[Fetch](https://docs.browserbase.com/platform/fetch/overview.md)**
>
> Return page content without an interactive browser session.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.