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.
Free-form location (simple)
Section titled “Free-form location (simple)”Pass the location as a string. Shifter resolves it to the best-matching geo on the fly.
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.
Canonical geo with the Locations API
Section titled “Canonical geo with the Locations API”To guarantee a specific city, resolve it first:
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=:
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=pizza&location=Chicago%2CIllinois%2CUnited+States"Country and language pair
Section titled “Country and language pair”Combine gl (country) and hl (language) to get results in the right format:
gl | hl | What you get |
|---|---|---|
us | en | US results in English (default) |
de | de | German results in German |
jp | ja | Japanese results in Japanese |
br | pt | Brazilian results in Portuguese |
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=news&gl=de&hl=de"Device
Section titled “Device”Mobile and desktop SERPs differ significantly (different features, different rankings). Pick explicitly:
curl "https://serp.shifter.io/v1?engine=google&api_key=YOUR_API_KEY&q=laptop&device=mobile"Values: desktop (default), mobile, tablet.
Yandex locations
Section titled “Yandex locations”Yandex uses its own location IDs via lr:
lr | City |
|---|---|
| 1 | Moscow |
| 2 | St. Petersburg |
| 11316 | Novosibirsk |
| 54 | Yekaterinburg |
Full list available via engine=yandex_locations.
- Google, engine list.
- REST API → SERP Locations, full Google geo parameter reference.