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

# Targeting

> Route residential traffic by country, state, city, or ASN

Targeting is controlled entirely through username modifiers. No separate endpoints per country.

## Format

```
Username: <base>-country-<cc>[-state-<sc>][-city-<n>][-asn-<num>]
Password: <your password>
```

Each level is independent — stop wherever you need to. To get a random IP at a broader level, just omit the narrower modifier.

## Country targeting

Use any ISO 3166-1 alpha-2 country code. Lowercase.

```bash theme={null}
# Germany — via the EU gateway
curl -x "http://adminpcowe-country-de:maskxsndyb@pr-eu.proxies.fo:13337" \
  https://api.ipify.org

# Japan — via the APAC gateway for lower latency
curl -x "http://adminpcowe-country-jp:maskxsndyb@pr-sg.proxies.fo:13337" \
  https://api.ipify.org

# Netherlands
curl -x "http://adminpcowe-country-nl:maskxsndyb@pr-eu.proxies.fo:13337" \
  https://api.ipify.org
```

Match the regional gateway to your target country for lowest latency.

## State targeting

Available for countries with state / regional subdivisions (US, Canada, Australia, Germany, Brazil, etc.).

```bash theme={null}
# Any IP in California
curl -x "http://adminpcowe-country-us-state-ca:maskxsndyb@pr-us.proxies.fo:13337" \
  https://api.ipify.org

# Ontario, Canada
curl -x "http://adminpcowe-country-ca-state-on:maskxsndyb@pr-us.proxies.fo:13337" \
  https://api.ipify.org
```

Omitting `city-` means "any city in that state" — the network picks one at random.

## City targeting

Append `-city-<n>` for a specific city. Lowercase and concatenated.

City targeting works **with or without** `state-`:

```bash theme={null}
# Westlake Village, CA (state omitted)
curl -x "http://adminpcowe-country-us-city-westlakevillage:maskxsndyb@pr-eu.proxies.fo:13337" \
  https://api.ipify.org

# Pleasanton, CA
curl -x "http://adminpcowe-country-us-city-pleasanton:maskxsndyb@pr-eu.proxies.fo:13337" \
  https://api.ipify.org

# Explicit state (when disambiguation is needed)
curl -x "http://adminpcowe-country-us-state-ca-city-pleasanton:maskxsndyb@pr-eu.proxies.fo:13337" \
  https://api.ipify.org
```

Add `state-` only when two cities share a name across states (e.g. "Springfield").

### City name format

* All lowercase
* No spaces, apostrophes, or hyphens (concatenate): `westlakevillage`, `sanfrancisco`, `newyorkcity`
* Accents stripped: `zurich` not `zürich`

## ASN targeting

`asn-<number>` pins your IP to a specific ISP by its Autonomous System Number. Useful for ad verification on specific carriers, CDN peering tests, or simulating traffic from a particular network.

```bash theme={null}
# AT&T customers in the US (ASN 7018)
curl -x "http://adminpcowe-country-us-asn-7018:maskxsndyb@pr-us.proxies.fo:13337" \
  https://api.ipify.org

# Comcast in any US city (ASN 7922)
curl -x "http://adminpcowe-country-us-asn-7922:maskxsndyb@pr-us.proxies.fo:13337" \
  https://api.ipify.org
```

### Common US ASNs

| ASN   | ISP                |
| ----- | ------------------ |
| 7018  | AT\&T              |
| 7922  | Comcast            |
| 701   | Verizon            |
| 20115 | Charter / Spectrum |
| 22773 | Cox                |
| 209   | CenturyLink        |

Find the ASN for any IP using `whois`, [bgp.he.net](https://bgp.he.net), or [ipinfo.io](https://ipinfo.io).

### Stacking ASN with geo

```bash theme={null}
# Comcast subscribers in Pleasanton, CA
curl -x "http://adminpcowe-country-us-city-pleasanton-asn-7922:maskxsndyb@pr-eu.proxies.fo:13337" \
  https://api.ipify.org

# AT&T in New York state
curl -x "http://adminpcowe-country-us-state-ny-asn-7018:maskxsndyb@pr-us.proxies.fo:13337" \
  https://api.ipify.org
```

The narrower the combined targeting, the smaller the pool. For high-concurrency workloads, keep at least one level wide.

## Targeting granularity cheat sheet

| Target                        | Username format                                  |
| ----------------------------- | ------------------------------------------------ |
| Random IP, any country        | `adminpcowe`                                     |
| Random IP in any US city      | `adminpcowe-country-us`                          |
| Random IP in any NY city      | `adminpcowe-country-us-state-ny`                 |
| Specific city (state skipped) | `adminpcowe-country-us-city-westlakevillage`     |
| Specific city within state    | `adminpcowe-country-us-state-ca-city-pleasanton` |
| Specific ISP (AT\&T)          | `adminpcowe-country-us-asn-7018`                 |
| ISP + city combined           | `adminpcowe-country-us-city-pleasanton-asn-7922` |

## Combining with sessions

```
adminpcowe-country-us-city-westlakevillage-session-5s5d4xud-ttl-15:maskxsndyb
```

Pins a Westlake Village IP for 15 minutes. See [Sessions](/residential/sessions).

## Quick-copy `host:port:user:pass`

```
pr-eu.proxies.fo:13337:adminpcowe-country-us-city-westlakevillage:maskxsndyb
pr-eu.proxies.fo:13337:adminpcowe-country-us-city-pleasanton:maskxsndyb
pr-eu.proxies.fo:13337:adminpcowe-country-us-state-ny:maskxsndyb
pr-us.proxies.fo:13337:adminpcowe-country-us:maskxsndyb
pr-us.proxies.fo:13337:adminpcowe-country-us-asn-7018:maskxsndyb
pr-us.proxies.fo:13337:adminpcowe-country-us-city-pleasanton-asn-7922:maskxsndyb
pr-sg.proxies.fo:13337:adminpcowe-country-jp:maskxsndyb
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="454 invalid country code">
    Country code isn't recognised. Use lowercase ISO 3166-1 alpha-2 (`us`, not `US` or `usa`).
  </Accordion>

  <Accordion title="454 invalid state code">
    State code not recognised for that country. Use standard subdivision codes (e.g. `ny`, `ca` for US states; `on`, `qc` for Canadian provinces).
  </Accordion>

  <Accordion title="454 invalid city code">
    City isn't recognised, or no IPs available. Check the city name is lowercase and concatenated. If valid but low availability, drop the `city-` modifier.
  </Accordion>

  <Accordion title="454 invalid ASN">
    ASN not in supported set, or no IPs for the combined geo + ASN. Verify with `whois` or bgp.he.net and try widening geo targeting.
  </Accordion>

  <Accordion title="Slow or timing out">
    Narrow targeting = smaller pool. Widen to state or country level, or split workloads across regional gateways.
  </Accordion>
</AccordionGroup>
