> For the complete documentation index, see [llms.txt](https://docs.plainproxies.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plainproxies.com/concepts/geo-targeting.md). Agents can also search and read this documentation through its [MCP server](https://docs.plainproxies.com/~gitbook/mcp).

# Geo-Targeting

Target specific geographic locations with your proxy requests.

### Overview

Geo-targeting allows you to route requests through proxies in specific countries, states, or cities. This is essential for:

* Accessing geo-restricted content
* Testing localized experiences
* Price comparison across regions
* Ad verification by location

### Supported Proxy Types

| Product     | Country | State | City |
| ----------- | ------- | ----- | ---- |
| Datacenter  | Yes     | No    | No   |
| ISP         | Yes     | No    | No   |
| Residential | Yes     | Yes   | Yes  |
| IPv6        | Yes     | No    | No   |

### Using Geo-Targeting

#### In Proxy Generation

```
POST /proxies/generate
```

```json
{
  "format": "{ip}:{port}:{user}:{pass}",
  "country": "US",
  "state": "California",
  "city": "Los Angeles",
  "quantity": 10
}
```

#### In Proxy Username

You can also specify location in the username:

```
username-country-US-state-California-city-LosAngeles:password
```

### Country Codes

Use ISO 3166-1 alpha-2 codes:

| Code | Country        |
| ---- | -------------- |
| `US` | United States  |
| `GB` | United Kingdom |
| `DE` | Germany        |
| `NL` | Netherlands    |
| `CA` | Canada         |
| `FR` | France         |
| `JP` | Japan          |
| `AU` | Australia      |

#### Get Available Countries

```
GET /countries
```

Returns all available countries grouped by product type.

### State Targeting

For US states, use full state names (residential proxies only):

```json
{
  "country": "US",
  "state": "California"
}
```

Common US states:

* California
* New York
* Texas
* Florida
* Illinois

### City Targeting

Specify city name along with country (residential proxies only):

```json
{
  "country": "US",
  "state": "California",
  "city": "Los Angeles"
}
```

Popular cities:

* New York
* Los Angeles
* Chicago
* London
* Tokyo
* Sydney

> City availability depends on our IP pool. Not all cities are available in all countries.

### Worldwide / Random

Omit location parameters to get random worldwide IPs:

```json
{
  "format": "{ip}:{port}:{user}:{pass}",
  "quantity": 10
}
```

Or explicitly use `WW`:

```json
{
  "country": "WW"
}
```

### Best Practices

* **Start broad** — Begin with country-level targeting
* **Check availability** — Use `/countries` to see available locations
* **Cache country data** — Country list doesn't change often
* **Handle fallbacks** — If a specific city is unavailable, fall back to state or country
* **Monitor success rates** — Some locations may have fewer IPs
