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

# Geo-Targeting Parameters

> Learn how to target specific countries, states, cities, ZIP codes, and ASNs by adding parameters to your proxy username.

Geo-targeting allows you to control the geographic location of the exit IP address for your requests. This is essential for accessing geo-restricted content, collecting localized data, and ad verification.

You can control geo-targeting by appending special parameters directly to your proxy's **username**.

**Base Username:** `2xt-customer-a1b2-proxy-my_scraper`

**Username with Geo-Targeting:** `2xt-customer-a1b2-proxy-my_scraper-country-de-city-berlin`

***

## Targeting Logic

Our gateway processes geo-parameters with the following rules:

* **Specificity Wins:** The most specific parameter is always used. For example, if you provide both `-city` and `-country`, the city will be prioritized.
* **Dependencies:** Some parameters require others. For example, you cannot target a city without specifying a country.
* **Mutual Exclusivity:** You can either target by **geography** (`country`, `state`, `city`, `zip`) OR by **network** (`asn`, `isp`). You cannot use both in the same request.

***

## Geographic Targeting Parameters

These parameters control the physical location of the proxy.

### Country (`-country`)

This is the most common targeting parameter. It allows you to select an IP from a specific country.

<Accordion title="Parameter Details">
  * **Format:** `-country-[code]`
  * **Value:** A 2-letter ISO 3166-1 alpha-2 country code (e.g., `us`, `de`, `gb`).
  * **Dependencies:** None.
  * **Example Username:** `...-my_scraper-country-de`
  * **Result:** Your request will be routed through a random IP in Germany.
  * **[View full list of supported countries](/data/countries)**
</Accordion>

### State / Region (`-state`)

Target a specific state or region within the selected country.

<Accordion title="Parameter Details">
  * **Format:** `-state-[code]`
  * **Value:** A state or region name (e.g., `california` for California, `newyork` for New York).
  * **Dependencies:** Requires `-country` to be present in the username.
  * **Example Username:** `...-my_scraper-country-us-state-california`
  * **Result:** Your request will be routed through an IP in California.
  * **[View full list of US states](/data/states)**
</Accordion>

### City (`-city`)

Target a specific city.

<Accordion title="Parameter Details">
  * **Format:** `-city-[name]`
  * **Value:** The name of the city in lowercase, with spaces removed (e.g., `newyork`, `sanfrancisco`).
  * **Dependencies:** Requires a `-country` parameter. Can be combined with `-state` for disambiguation.
  * **Example (Simple):** `...-my_scraper-country-fr-city-paris`
  * **Example (With State):** `...-my_scraper-country-us-state-il-city-springfield`
  * **Result:** Your request will be routed through an IP in the specified city.
  * **Note on Ambiguity:** If a country has multiple cities with the same name, you **must** provide a `-state` to clarify. Otherwise, the gateway will return an error.
</Accordion>

### ZIP Code (`-zip`)

Target a specific ZIP code. Ideal for hyper-local data collection.

<Accordion title="Parameter Details">
  * **Format:** `-zip-[code]`
  * **Value:** A ZIP code.
  * **Dependencies:** Requires `-country`. Can be combined with `-state` and `-city` for more precise targeting.
  * **Example Username:** `...-my_scraper-country-us-zip-90210`
  * **Result:** Your request will be routed through an IP in the Beverly Hills area.
</Accordion>

***

## Network Targeting Parameters

These parameters control the network origin of the proxy. They are mutually exclusive with all geographic parameters.

### ASN (`-asn`)

Target a specific Internet Service Provider (ISP) by its Autonomous System Number (ASN).

<Accordion title="Parameter Details">
  * **Format:** `-asn-[number]`
  * **Value:** The numerical ASN of the provider (e.g., `7922` for Comcast).
  * **Dependencies:** Mutually exclusive with all geographic parameters (`-country`, `-state`, `-city`, `-zip`).
  * **Example Username:** `...-my_scraper-asn-7922`
  * **Result:** Your request will be routed through an IP belonging to the Comcast network.
  * **Tip:** You can find ASN numbers for major providers on sites like [ipinfo.io](https://ipinfo.io/AS24940?lookup_source=search-bar).
</Accordion>

### ISP (`-isp`) - Mobile Proxies Only

Target a specific mobile network operator by its numeric ISP code. Available for mobile proxies only.

<Accordion title="Parameter Details">
  * **Format:** `-isp-[code]`
  * **Value:** The numeric code of the mobile operator as provided in the ISP reference list (e.g., `310260` for T-Mobile US).
  * **Dependencies:** Mutually exclusive with all geographic parameters (`-country`, `-state`, `-city`, `-zip`). Available on mobile proxies only.
  * **Example Username:** `...-my_scraper-isp-310260`
  * **Result:** Your request will be routed through an IP on the T-Mobile US network.
  * **Note:** The ISP code is a numeric identifier, not a name slug. Use the code from the ISP selector in your proxy dashboard.
</Accordion>
