International Rank Tracking: Monitor Google in 40+ Countries

By Serpent API Team · · 10 min read

Here's a trap a lot of global brands fall into: they check their rankings from one office, see "position 4," and assume that's the truth everywhere. It isn't. Google localizes results by country and language, so the same keyword can show a totally different top 10 in New York, Berlin, and Mumbai. You might own a term at home and be invisible in the market you're trying to grow.

The fix is to stop checking from one place and start checking from everywhere that matters. In this tutorial we'll build a Python tracker that monitors the same keywords across dozens of countries through one SERP API, and rolls the results into a single comparison table you can actually act on.

This is different from local SEO tracking, which zooms into the map pack within one market. Here we're comparing organic positions across markets.

Why one rank check lies to you

Localization isn't a minor tweak. Google weighs local domains, language, regional intent, and in-country popularity. A software brand can rank #2 in the US, #9 in the UK, and off page one in France — for the identical English keyword. If your expansion plan rides on "we rank well," you need to know well, where?

A multi-country tracker turns that fuzzy worry into a grid: keyword down the side, country across the top, your position in every cell. Suddenly the gaps — and the easy wins — are obvious.

The country parameter

Every Serpent search endpoint accepts a country parameter that localizes results to that market. The list of supported codes comes straight from the API:

curl "https://apiserpent.com/api/countries" -H "X-API-Key: $SERPENT_API_KEY"

Pass country=de and you see Germany's results; country=jp gives Japan's. That single parameter is the whole mechanism — the rest is looping cleanly and presenting the output well.

Step 1: Check one keyword, one country

Find your domain's position in a single market:

import os, requests

KEY = os.environ["SERPENT_API_KEY"]

def position(keyword, domain, country):
    r = requests.get("https://apiserpent.com/api/search",
        params={"q": keyword, "country": country, "num": 100},
        headers={"X-API-Key": KEY}, timeout=120)
    r.raise_for_status()
    organic = r.json().get("results", {}).get("organic", [])
    for item in organic:
        if domain in (item.get("url") or ""):
            return item.get("position")
    return None  # not in top 100

One API, every market. The Google SERP API localizes results to any supported country with a single parameter — no per-country proxies to manage. See pricing →

Step 2: Build the country matrix

Loop your keywords across your target countries and store every position. A dictionary keyed by (keyword, country) is plenty:

KEYWORDS  = ["project management software", "time tracking app"]
COUNTRIES = ["us", "gb", "de", "fr", "in", "br", "au", "jp"]
DOMAIN    = "yourdomain.com"

def build_matrix():
    grid = {}
    for kw in KEYWORDS:
        for c in COUNTRIES:
            pos = position(kw, DOMAIN, c)
            grid[(kw, c)] = pos
            print(f"  {kw[:28]:28} {c}: {pos or '—'}")
    return grid

The full tracker

Add a tidy table render and a "biggest gaps" summary, and the tool is done:

import os, requests

KEY = os.environ["SERPENT_API_KEY"]
DOMAIN    = "yourdomain.com"
KEYWORDS  = ["project management software", "time tracking app"]
COUNTRIES = ["us", "gb", "de", "fr", "in", "br", "au", "jp"]

def position(kw, country):
    r = requests.get("https://apiserpent.com/api/search",
        params={"q": kw, "country": country, "num": 100},
        headers={"X-API-Key": KEY}, timeout=120)
    r.raise_for_status()
    for it in r.json().get("results", {}).get("organic", []):
        if DOMAIN in (it.get("url") or ""):
            return it.get("position")
    return None

def run():
    print(f"keyword".ljust(30) + "".join(c.upper().rjust(6) for c in COUNTRIES))
    print("-" * (30 + 6 * len(COUNTRIES)))
    gaps = []
    for kw in KEYWORDS:
        row = kw[:28].ljust(30)
        for c in COUNTRIES:
            p = position(kw, c)
            row += (str(p) if p else "—").rjust(6)
            if p is None or p > 10:
                gaps.append((kw, c, p))
        print(row)
    print("\nBiggest gaps (off page one):")
    for kw, c, p in gaps:
        print(f"  {c.upper()}  '{kw}'  -> {p or 'not in top 100'}")

if __name__ == "__main__":
    run()

The output is a grid you can paste into a deck:

keyword                          US    GB    DE    FR    IN    BR    AU    JP
------------------------------------------------------------------------------
project management software       2     4     9     —    11     7     5     —
time tracking app                 6     8     —     —     3    14     9     —

Biggest gaps (off page one):
  FR  'project management software'  -> not in top 100
  DE  'project management software'  -> 9
  ...

Language and the long tail

Two refinements once the basics work:

Track the localized keyword, not just the English one. In France you may rank fine for the French-language query and nowhere for the English one. Add language-appropriate keywords per market and you'll measure what local searchers actually type. Most endpoints accept a language hint alongside country — see the docs.

Schedule it and store history. Append each run to a CSV with a date column, and you get trend lines per market — perfect for spotting which countries are gaining and which slipped after a Google update. This drops straight into the 100-line rank tracker scaffolding; just add the country loop.

From there you can chart it, alert on drops, or feed it into your reporting stack. The point is simple: stop trusting a single-location rank check, and start seeing your real position in every market you care about.

FAQ

Do Google rankings really differ by country?

Yes — Google localizes by country and language, so the same keyword can return a different top 10 in each market. A single-location check doesn't represent how you appear elsewhere.

How do I track a specific country?

Pass a country parameter to the SERP API to localize results, then loop the same keyword across your list of country codes and record each position.

Is this the same as local SEO?

No. Local SEO tracks the map pack within one market; international tracking compares organic positions across countries and languages.

How many countries should I track?

The markets you sell into plus any you're expanding toward — usually 5 to 40. The tracker scales linearly, so budget is the only real limit.

Track Rankings in Every Market

The Google SERP API localizes results to any supported country with one parameter — build your global rank tracker today. 100 free quick-search calls on signup.

Get Your Free API Key

Explore: Google SERP API · AI Rank API · Playground · Docs