Ever wondered why your site ranks #3 in one city but doesn’t even show up on page one in another? It’s not just about keywords anymore. Search engines personalize results based on location, language, and device type.
If you’re doing local SEO or running multilingual campaigns, tracking rankings from a single static location is a trap. You’re measuring the wrong data. Here’s how to build a smarter, more realistic ranking check script that respects geo-targeting.
The Problem with Standard SERP Scraping
Most ranking tools hit Google from a US server with a desktop user agent. That’s fine if you’re a global brand targeting English-speaking desktop users. But if you’re a bakery in Berlin or a SaaS targeting mobile users in Brazil, your real SERPs look completely different.
The fix? Use a proxy or API that lets you specify country, language, and device parameters. Let me show you a minimal Python example using the requests library against a typical SERP API (like SerpApi or a custom endpoint).
import requests
def check_rank(keyword, domain, country="de", language="de", device="mobile"):
params = {
"q": keyword,
"gl": country, # geolocation
"hl": language, # interface language
"device": device,
"num": 100
}
# Replace with your actual endpoint key
response = requests.get("https://api.example.com/search", params=params)
data = response.json()
for index, result in enumerate(data["organic_results"], start=1):
if domain in result["domain"]:
return index
return None
# Usage
rank = check_rank("best coffee beans", "mycoffeeshop.de", country="de", language="de", device="mobile")
print(f"Mobile rank in Germany: {rank}")
This is the core logic. But the real challenge isn’t the code—it’s the data source. You need a service that actually queries the live index from the specified geo location.
Why the "Live" Part Matters
Cached data is useless. If you check rankings on Monday and your competitor changes their title tag on Tuesday, your report is stale. You need a tool that hits the search engine live, every time, with the correct geo headers.
This is exactly why I built my workflow around a dedicated tool. Instead of maintaining my own proxy pools and dealing with CAPTCHAs, I use SERPSpur’s Live Search Engine Ranking Checker. It lets me plug in a keyword, select a specific country, language, and mobile/desktop, and get a fresh result in seconds.
It’s not a magic bullet—it’s just a reliable data source. My value is in interpreting the data: spotting when your mobile rank tanks in a specific region or when your international landing pages aren’t being indexed properly.
Quick Takeaway
Don’t trust a single global rank. Segment your tracking by:
- Country (
gl) - Language (
hl) - Device (mobile/desktop)
If you’re coding your own scraper, respect those params. If you want to save time, use a live API. Either way, your SEO decisions will finally match what your actual customers see.
Top comments (0)