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.orgIf 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
| Parameter | What it does | Example | Billing |
|---|---|---|---|
cr | Use IPs from these countries | cr.de,au | Standard |
nocr | Any country except these | nocr.de | Standard |
noasn | Exclude a network (ASN) | noasn.20947 | Standard |
state | US state | cr.us;state.arizona | Double |
nostate | Exclude a US state | cr.us;nostate.california | Double |
city | City | cr.de;city.berlin | Double |
nocity | Exclude a city | cr.de;nocity.berlin | Double |
zip | ZIP or postal code | cr.us;zip.10001 | Double |
nozip | Exclude a ZIP or postal code | cr.de;nozip.10115 | Double |
asn | A specific network or mobile carrier (ASN) | cr.pl;asn.39603 | Double |
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.orgSee 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.