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

# IP Proxy

> Route your browser traffic through residential and datacenter proxies

Grasp provides built-in support for IP proxies, allowing you to route your browser's traffic through different locations and IP types. This is essential for web scraping, testing geo-restricted content, and avoiding IP blocks.

## Overview

When creating a browser container, you can specify a `proxy` configuration object. Grasp manages the underlying proxy infrastructure, rotating IPs and handling authentication automatically.

We support the following proxy types:

* **Residential**: Real residential IPs (highest success rate, harder to detect).
* **Datacenter**: Fast, cost-effective IPs from data centers.
* **ISP**: Static residential IPs.
* **Mobile**: 3G/4G/5G mobile network IPs.

## Usage

<CodeGroup>
  ```javascript JavaScript/TypeScript theme={null}
  import { Grasp } from '@getgrasp/sdk';

  const grasp = new Grasp();

  const browser = await grasp.create({
    proxy: {
      enabled: true,
      type: 'residential',
      country: 'us',
    }
  });
  ```

  ```python Python theme={null}
  from grasp import Grasp

  grasp = Grasp()

  browser = await grasp.create(
      proxy={
          "enabled": True,
          "type": "residential",
          "country": "us",
      }
  )
  ```
</CodeGroup>

## Configuration Options

The `proxy` object supports the following properties:

<ParamField body="enabled" type="boolean" default="false">
  Whether to enable the proxy. Defaults to `false`. Must be set to `true` to enable proxy functionality.
</ParamField>

<ParamField body="type" type="string" default="residential">
  The type of proxy. Supported values: `'residential'`, `'datacenter'`, `'isp'`, `'mobile'`.
</ParamField>

<ParamField body="country" type="string" default="us">
  The 2-letter ISO country code (e.g., `'us'`, `'jp'`, `'gb'`).
</ParamField>

<ParamField body="city" type="string">
  Specific city name (optional).
</ParamField>

<ParamField body="state" type="string">
  Specific state/province name (optional).
</ParamField>

## Best Practices

* **Use Residential Proxies for Scraping**: For targets with strict anti-bot measures, residential proxies are recommended as they appear as regular user traffic.
* **Use Datacenter Proxies for Speed**: If the target is lenient, datacenter proxies are faster and cheaper.
