DEV Community

Emma Watson
Emma Watson

Posted on

I Built a Python Keyword Scoring System That Finds Low-Competition SEO Opportunities by Country

When I started building my first real SaaS product, I thought I had the SEO part figured out. I was wrong. My biggest bottleneck wasn't writing content—it was validating whether the keywords I was targeting actually had commercial intent in specific markets.

Here is the thing: Search volume is a vanity metric if you don't understand the competition. A keyword might have 10,000 monthly searches in the US, but if the top 10 results are all authority domains with massive backlink profiles, you're wasting your time. Conversely, a keyword with 500 searches in Germany might have zero ads competition and a keyword difficulty score under 15, which is a goldmine for a new domain.

I recently ran a workflow that completely changed how I prioritize my content calendar. Instead of guessing, I wrote a simple Python script to pull data from the SERPSpur Keyword Research Tool and score opportunities based on a custom formula.

Here is the core logic I used to filter out the noise:

import requests

def analyze_keywords(keywords, country):
    results = []
    for kw in keywords:
        # Fetch data from the API (pseudo-code)
        data = get_serpspur_data(kw, country)

        # Custom scoring: (Search Volume * CPC * 0.5) / (KD + Ad Competition)
        score = (data['volume'] * data['cpc'] * 0.5) / (data['difficulty'] + data['ads_competition'])

        # Filter: Find low-competition, high-value keywords
        if data['difficulty'] < 20 and data['ads_competition'] < 0.3:
            results.append({
                'keyword': kw,
                'volume': data['volume'],
                'cpc': data['cpc'],
                'kd': data['difficulty'],
                'score': round(score, 2)
            })
    return sorted(results, key=lambda x: x['score'], reverse=True)

# Example usage for the German market
keywords = ["seo tool", "keyword planner", "backlink checker"]
print(analyze_keywords(keywords, "de"))
Enter fullscreen mode Exit fullscreen mode

The key insight here is the country-specific data. The tool allows you to switch to specific countries, which is crucial. What works in the US rarely works in France or Japan. The ads competition metric is particularly useful—if nobody is bidding on a keyword via Google Ads, it usually means the traffic is too cold for commercial conversion, or the market is underserved.

My actual workflow now:

  1. Brainstorm 50–100 seed keywords.
  2. Pull volume, CPC, KD, and Ads Competition for target countries.
  3. Filter by KD < 25 and Ads Competition < 0.3.
  4. Rank by a weighted score that prioritizes CPC (revenue potential) over raw volume.

This approach helped me find a niche in the Dutch market where the difficulty was 12 and CPC was $3.50. I published two articles targeting those terms, and within three weeks, I was ranking on page one.

The point isn't to promote a specific tool—it's to stop treating keyword research as a one-size-fits-all metric. Use the filters available to you. Look at the ads competition. Look at the difficulty score relative to your domain authority. And always, always segment by country. Your organic traffic strategy will thank you.

Top comments (1)

Collapse
 
08 profile image
Victoria

Thanks for putting this into words—I've been wrestling with the same issue for weeks now. The part about prioritizing tasks really clicked for me; do you think it's better to tackle the hardest task first or the quickest win?