Skip to content
Login Sign up

Locations

For most SERP requests, a free-form location= string is enough. When you need canonical city-level targeting matched against Google’s own location taxonomy, use the Locations API to resolve place strings into a uule value.

Pass the location as a string. Shifter resolves it to the best-matching geo on the fly.

Terminal window
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=pizza&location=Chicago%2C+Illinois"

Works for 95% of use cases. The downside: ambiguous strings (Springfield, London) may pick a different city than you expect.

To guarantee a specific city, resolve it first:

Terminal window
curl "https://serp.shifter.io/v1?engine=locations&api_key=YOUR_API_KEY&q=Chicago"

The response lists every matching location with a canonical name, country_code, target_type (City, State, Country), and a google_id. Pick the one you want and use its canonical name in location=:

Terminal window
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=pizza&location=Chicago%2CIllinois%2CUnited+States"

Combine gl (country) and hl (language) to get results in the right format:

glhlWhat you get
usenUS results in English (default)
dedeGerman results in German
jpjaJapanese results in Japanese
brptBrazilian results in Portuguese
Terminal window
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=news&gl=de&hl=de"

Mobile and desktop SERPs differ significantly (different features, different rankings). Pick explicitly:

Terminal window
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=laptop&device=mobile"

Values: desktop (default), mobile, tablet.

Yandex uses its own location IDs via lr:

lrCity
1Moscow
2St. Petersburg
11316Novosibirsk
54Yekaterinburg

Full list available via engine=yandex_locations.