DEV Community

Carllowman
Carllowman

Posted on

Keyword Research Across Countries: Volume, CPC & SEO Difficulty

Building a Multi-Country Keyword Research CLI with Node.js

Keyword research looks simple when you're viewing a dashboard.

Enter a keyword, choose a country, and you get search volume, CPC, competition, and difficulty.

But building a lightweight keyword research CLI with Node.js changed the way I look at SEO data.

The difficult part isn't fetching the numbers.

It's understanding what those numbers actually mean across different markets.

Why Country-Level Keyword Data Matters

Consider a keyword like:

best running shoes

Suppose an API returns:

US: 50,000 searches/month
Germany: 5,000 searches/month
France: 4,000 searches/month
Spain: 3,500 searches/month

Looking only at total search volume might make this look like a global opportunity.

But the distribution tells a different story.

The US is clearly driving most of the demand.

Now imagine another keyword with:

US: 12,000
Germany: 11,000
France: 10,000
Spain: 9,000

That's a very different SEO opportunity.

This is why I prefer adding a comparison layer instead of looking at keyword metrics independently.

A Simple Node.js Approach

Here's a simplified example using JavaScript. The API endpoint is intentionally generic, so the same structure can be adapted to your preferred keyword data provider.

const analyzeKeyword = async (keyword, countries) => {
const results = await Promise.all(
countries.map(async (country) => {
const res = await fetch(
https://api.example.com/keyword?q=${encodeURIComponent(keyword)}&country=${country}
);

  const data = await res.json();

  return {
    country,
    volume: data.volume,
    cpc: data.cpc,
    difficulty: data.difficulty,
    adsCompetition: data.adsCompetition,
  };
})
Enter fullscreen mode Exit fullscreen mode

);

return results.map((result) => ({
...result,
normalizedDifficulty: Math.round(
Math.min(100, Math.max(0, result.difficulty))
),
}));
};

The important part isn't the API request itself.

It's what you do with the returned data.

Don't Treat Every Metric the Same

Search volume tells you about demand.

CPC can provide clues about commercial value.

Organic difficulty estimates how competitive the search results may be.

Ads competition gives another perspective on advertiser interest.

These metrics should be interpreted together.

For example:

High volume + high difficulty

Could represent strong demand but require significant resources to compete.

Low volume + low difficulty

Could be useful for niche content, especially when the keyword has strong conversion intent.

High CPC + relatively low organic difficulty

Can deserve further investigation because commercial value appears strong while organic competition may be more manageable.

It's not automatically a "goldmine," but it's a useful signal.

Finding Opportunities Programmatically

Once the data is normalized, you can create simple filters.

const findOpportunities = (results) => {
return results.filter(
(result) =>
result.volume > 1000 &&
result.cpc > 1 &&
result.normalizedDifficulty < 40
);
};

These thresholds aren't universal SEO rules.

They're simply starting points.

A B2B SaaS company might prefer a much higher CPC threshold.

A local business might care more about location and conversion intent than raw volume.

An affiliate site may prioritize volume and achievable difficulty.

The important idea is to make the filtering logic match the business model.

Three Patterns I Look For

When comparing a keyword across multiple countries, I usually look for three things.

  1. Volume Skew

If one country generates 80% of the total search volume, the keyword may not actually be a balanced global opportunity.

It could be heavily concentrated in one market.

That affects content localization, link-building priorities, and even which country should be targeted first.

  1. CPC Divergence

CPC differences can reveal differences in commercial intent.

For example:

Country Volume CPC
US 20,000 $6.20
Germany 15,000 $2.10
Spain 9,000 $0.90

The keyword may have similar demand across markets, but its commercial value could be very different.

That deserves investigation before creating one identical SEO strategy for every country.

  1. Difficulty Gaps

Imagine:

France Difficulty: 35
Germany Difficulty: 82
UK Difficulty: 76
Spain Difficulty: 41

The keyword might be considerably easier to attack in France or Spain.

That doesn't necessarily mean those markets are better.

But it could mean they're better entry points.

A Practical Example

Let's say we're researching:

digital marketing agency

Across four European markets, we might get something like:

Country Monthly Searches Difficulty
France 8,000 35
Germany 12,000 82
Spain 6,500 44
Italy 5,000 39

Germany has the largest search volume.

But France has a much lower difficulty score.

If the business has limited SEO resources, immediately targeting Germany simply because it has the highest volume may not be the best decision.

France could potentially provide a more realistic path to visibility.

That's the type of insight a dashboard can easily hide when you're looking at one country at a time.

Building a Better CLI

The next step would be turning the script into a reusable command-line workflow.

For example:

node keyword-cli.js "digital marketing agency" \
--countries US,GB,DE,FR,ES \
--min-volume 1000 \
--max-difficulty 40

The CLI could then return:

Keyword: digital marketing agency

Country Volume CPC Difficulty Opportunity
FR 8,000 3.40 35 YES
DE 12,000 4.10 82 NO
ES 6,500 2.20 44 NO
UK 9,000 5.10 71 NO
US 18,000 6.80 79 NO

Now the output isn't just a collection of SEO metrics.

It's a decision-making dataset.

You Can Also Compare Markets by Opportunity

A more advanced version could calculate an opportunity score.

For example:

const opportunityScore = (result) => {
const volumeScore = Math.min(result.volume / 10000, 1);
const cpcScore = Math.min(result.cpc / 10, 1);
const difficultyScore = 1 - result.normalizedDifficulty / 100;

return Math.round(
(volumeScore * 0.4 +
cpcScore * 0.3 +
difficultyScore * 0.3) *
100
);
};

Again, this isn't a universal SEO formula.

The weights should depend on the business.

The value comes from creating a consistent framework for comparing opportunities.

Where Tools Like SerpSpur Fit

You don't always need to build the entire system yourself.

A purpose-built keyword research platform such as SerpSpur can provide the underlying keyword data and country-level perspective without requiring you to maintain your own data pipeline.

The useful part is combining that data with your own analysis.

For example, you can use keyword research data to identify potential markets and then evaluate:

Search intent
SERP competition
Content requirements
CPC
Organic difficulty
Local demand
Existing competitors
Conversion potential

That's where keyword research becomes more than simply finding keywords.

The Bigger SEO Lesson

The biggest lesson I learned from building this CLI is simple:

SEO data is only useful when you understand the relationship between the metrics.

A keyword with 50,000 searches isn't automatically better than one with 5,000.

A high CPC doesn't automatically mean high conversion potential.

A low difficulty score doesn't automatically mean an easy ranking.

And a country with the largest search volume isn't necessarily the best market to enter.

The real opportunity appears when you compare the signals.

Build the comparison layer.

Normalize the data.

Look for differences between countries.

Then turn those differences into an SEO decision.

That's when keyword research starts becoming a strategy rather than just a spreadsheet full of numbers.

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.