> ## 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.
* **Sticky Sessions Freeze Targeting:** If your username contains a `-session` parameter, the targeting is bound to that session ID at its first request. Changing the targeting while reusing the same session ID has no effect until the session expires - generate a new session ID instead. See [Session Control Parameters](https://docs.2extract.com/proxy-products/configuration/session.md).

***

## 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] 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](https://docs.2extract.com/data/countries.md)**

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

Target a specific state or region within the selected country.

> [accordion] 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 the full list of regions/states](https://docs.2extract.com/data/states.md)**

### City (`-city`)

Target a specific city.

> [accordion] 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, add `-state` to pick the right one. Without it, you may get an IP from another city with the same name.
> * **[View the full list of cities](https://docs.2extract.com/data/cities.md)**

### ZIP Code (`-zip`)

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

> [accordion] 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.
> * **[View the full list of ZIP codes](https://docs.2extract.com/data/zips.md)**

***

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

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

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

> [accordion] 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.
> * **[View the full list of ISPs](https://docs.2extract.com/data/isp.md)**


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