DEV Community

Dylan Parker
Dylan Parker

Posted on

Ever tried reverse-engineering why a competitor is suddenly ranking for all your target keywords?

I recently needed to audit a client’s organic visibility across five different countries. Manually checking each market in Google Search Console is tedious, and third-party APIs can get expensive fast. Instead, I used a simple approach with the Traffic & Competitor Explorer tool from SERPSpur (https://serpspur.com/tool/traffic-competitor-explorer/). The idea is straightforward: plug in a domain, select a country, and get back estimated traffic, top keywords, and competitor comparisons.

Here’s how I structured the analysis in a quick script. First, I defined a function to pull the data via their API (they offer a free tier for testing):

import requests

def get_competitor_traffic(domain, country_code):
    url = "https://api.serpspur.com/v1/traffic"
    params = {
        "domain": domain,
        "country": country_code,
        "api_key": "YOUR_API_KEY"
    }
    response = requests.get(url, params=params)
    if response.status_code == 200:
        data = response.json()
        return {
            "domain": domain,
            "country": country_code,
            "estimated_monthly_traffic": data.get("traffic"),
            "top_keywords": data.get("keywords", [])[:10]
        }
    else:
        return {"error": response.status_code}
Enter fullscreen mode Exit fullscreen mode

Then I looped over a list of competitors and countries:

competitors = ["example.com", "competitor1.com", "competitor2.com"]
countries = ["us", "gb", "de", "fr", "jp"]
results = []
for domain in competitors:
    for country in countries:
        res = get_competitor_traffic(domain, country)
        if "error" not in res:
            results.append(res)
            print(f"{domain} in {country}: {res['estimated_monthly_traffic']} visits")
Enter fullscreen mode Exit fullscreen mode

The output gave me a clear picture: one competitor dominated in Germany but barely registered in France. That insight alone reshaped our content strategy—we doubled down on French-language landing pages while avoiding head-to-head battles in Germany.

Why this matters: you don’t need a huge budget to get competitor intelligence. Tools like this expose gaps in visibility across search markets, especially when you filter by country. Next time you’re planning a geo-targeted campaign, try this approach. It’s data-driven, fast, and surprisingly affordable.

Top comments (1)

Collapse
 
lucy-green profile image
Lucy Green

This is a great reminder that simplicity often wins. I've found that writing tests first forces me to keep my code cleaner, even when I'm tempted to over-engineer. Thanks for sharing your perspective.