Skip to content
Login Sign up

Geo-targeting

Geo-targeting is configured per request by adding flags to the username. No dashboard change, no separate endpoint, every request flows through the same gateway.

Flags append to your username with dashes:

customer-USERNAME-country-<code>-region-<name>-city-<name>-asn-<number>

Values are lowercase. Region and city names use underscores for spaces. Country codes are ISO 3166-1 alpha-2.

FlagValueExample
countryISO country codecountry-us, country-gb, country-de
regionLowercase region/state slugregion-california, region-new_south_wales
cityLowercase city slugcity-new_york, city-los_angeles
asnASN numberasn-7922 (Comcast), asn-701 (Verizon)
stricttruestrict-true (see Fallback behavior)

Combine flags in any order:

customer-USERNAME-country-us-region-california-city-los_angeles
customer-USERNAME-country-gb-asn-2856
customer-USERNAME-city-berlin
Terminal window
curl -x customer-USERNAME-country-de-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \
https://ipinfo.io/json

By default, if no IPs match your full filter at request time (for example, an obscure city with a momentarily empty pool), the gateway falls back to a broader pool so the request still completes.

Add strict-true to opt out of the fallback and receive HTTP 502 instead. Use strict matching when an exact geo match is more important than the request succeeding:

Terminal window
curl -x customer-USERNAME-country-us-city-new_york-strict-true-sid-9f3a2b7c-ttl-600:PASSWORD@p.shifter.io:443 \
https://ipinfo.io/json

Omit all flags to pull from the full global pool:

USERNAME

Every request still rotates to a different IP, just with no geographic constraint.

  • Sessions, hold the targeted IP across multiple requests.
  • Integrations, plug geo flags into Scrapy, Puppeteer, Playwright.