Location targeting

Choose the country, state, city, ZIP code or ASN of your residential and mobile proxy IPs by adding parameters to the proxy username.

On rotating residential and mobile plans, you choose where your IPs come from by adding parameters to your proxy username. No dashboard change is needed, so each request can use a different location.

Parameter format

Add two underscores after your username, then one or more parameters:

USERNAME__cr.de                      one country (Germany)
USERNAME__cr.de,au                   any of several countries
USERNAME__cr.us;state.arizona        a country plus a narrower filter
  • A parameter is a key and its values, separated by a dot: cr.de.
  • Separate several values with commas: cr.de,au.
  • Separate several parameters with semicolons: cr.us;city.chicago.
  • Country codes are two-letter ISO codes in lowercase: us, gb, de.
curl -x "http://USERNAME__cr.de:PASSWORD@HOST:823" https://api.ipify.org

If your HTTP library rejects ; or , inside a proxy URL, percent-encode them as %3B and %2C. The library decodes them before it sends your credentials.

Targeting parameters

ParameterWhat it doesExampleBilling
crUse IPs from these countriescr.de,auStandard
nocrAny country except thesenocr.deStandard
noasnExclude a network (ASN)noasn.20947Standard
stateUS statecr.us;state.arizonaDouble
nostateExclude a US statecr.us;nostate.californiaDouble
cityCitycr.de;city.berlinDouble
nocityExclude a citycr.de;nocity.berlinDouble
zipZIP or postal codecr.us;zip.10001Double
nozipExclude a ZIP or postal codecr.de;nozip.10115Double
asnA specific network or mobile carrier (ASN)cr.pl;asn.39603Double

State, city, ZIP and ASN filters need a country (cr) in the same username. Write names in lowercase, for example city.berlin. For names with several words, use the spelling from the location list in your dashboard.

How targeting is billed

City, state, ZIP and ASN targeting on per-GB pools uses traffic at 2x the standard rate. For example, 1 GB of traffic through cr.us;city.chicago uses 2 GB of your balance. Country selection, country exclusion and ASN exclusion are billed at the standard rate.

Use the broadest location that answers your question. Country targeting is enough for most price, search and ad checks; city and ZIP targeting are for local results that really differ by area.

Combining targeting with sessions

Targeting works on both rotating and sticky connections. To keep one IP from a location, add a session parameter:

# A German IP that stays the same for about 30 minutes
curl -x "http://USERNAME__cr.de;sessid.job42:PASSWORD@HOST:823" https://api.ipify.org

See Rotation and sticky sessions for sessid and sessttl.

When no IP matches

If no IP is available for your filters right now, the proxy returns 503 NO_RAY. Small cities, rare ZIP codes and narrow ASN filters are the usual cause. Widen the filter, for example from city to state or from state to country, and try again.

On this page