Rankings differ by market — the same keyword can show completely different results in the US, Brazil and Germany. A Google Search API with a country parameter lets you track each market accurately. Here’s how with serp.cheap.
The gl parameter
gl selects which country’s Google you query, using the right TLD and regional language:
import requests
def rank_in(keyword, domain, gl):
data = requests.post("https://api.serp.cheap/v1/search",
headers={"X-API-Key": "YOUR_KEY"},
json={"q": keyword, "gl": gl}).json()
for r in data["organic"]:
if domain in r["link"]:
return r["position"]
return None
for market in ["us", "gb", "de", "br"]:
print(market, rank_in("running shoes", "nike.com", market))
Supported countries
us, br, gb, de, fr, es, it, mx, ca, au, jp, nl — 12 markets, each with the correct Google TLD and language. Add hl to override the display language within a country (e.g. French results in Canada).
City-level intent
serp.cheap localises at the country level. For city or neighbourhood intent, bake the location into the query — "emergency plumber austin tx" — and pin gl to the country. That captures the local-intent SERP for that phrase.
Build a multi-market dashboard
Loop your keyword list across gl values and store (date, keyword, market, position). You now have a location-aware rank tracker — see build a rank tracker in Python for the storage/scheduling pattern.
Cost
One request per keyword per market. 50 keywords × 4 markets daily = 200 requests ≈ $0.12/day fresh, less with cache hits.
Next
Try serp.cheap
Track your keywords across all 12 markets with one API. 100 free searches on signup — no card required; pay-as-you-go from $0.75/1k after that, and credits stay valid for 12 months.
- Get your free API key →
- Prefer paying by card? serp.cheap is also on RapidAPI (
$0.90/1k) and Apify ($1.50/1k).