Skip to content

Keyword research automation

Generate every way a buyer could search for what you sell, run it through Ahrefs in rounds, and keep only keywords that pass intent and acceptance tests.

Automate keyword research without trusting the first list

You describe the business and the kinds of pages you sell. The build generates every plausible way a buyer could search for them, runs the candidates through Ahrefs in bulk, and hands back a keyword universe that has been de-duplicated, filtered, ranked by intent and tested against a list you already trust.

The heavy part runs in Claude Code with Python scripts. A lighter n8n step handles the keywords that arrive one at a time afterwards. Between them they automate keyword research at both ends: the big build and the daily trickle.

The four ways a keyword list goes wrong

Most B2B keyword research starts from a seed and a tool's suggestions. The list looks long, but it is shaped by whatever the seed happened to be, so it misses whole families of searches without any sign that it has.

The clearest evidence came from a generator that had already produced 18,501 candidates over four rounds for a software development client. The client then checked 139 keywords by hand, and 118 of them, worth 10,160 searches a month, had never been on the list. Every miss fell into one of four patterns.

The miss

What it cost

Only one number of the business noun

".net development firms", 150 a month

Locations written without "in"

"software development company romania", 200 a month

The bare category term

"top software development companies", 1,000 a month

An adjective set two words wide

"affordable app development company", 100 a month

Reading harder was not the fix. The client's own verified keywords became the acceptance test, and the next round was rebuilt until a script confirmed it covered all 118.

How to automate keyword research in rounds

The build is a loop rather than a single query. That is also why it is cheap: it uses the Ahrefs Keyword Explorer export instead of thousands of API calls.

  1. Treat the client's query patterns as a specification and generate the full cross-product of services, business nouns (company, agency, services, firm), adjectives and question shapes.
  2. Split the candidates into paste-ready blocks. Keyword Explorer takes 10,000 keywords per search, so a 5,000-row round is one paste.
  3. Export, merge the results back onto the structure that generated them, and de-duplicate against every earlier round so nobody checks a keyword twice.
  4. Filter to a volume floor and record what the filter removed.
  5. Test the survivors against any keywords the client verified by hand, and generate another round for whatever is missing.

On one engagement the rounds ran 5,374, 6,406, 3,944 and 2,973 candidates, and 1,192, 605, 220 and 68 of them cleared a floor of 10 searches. Later rounds chased new shapes, such as cost and where-to-hire questions, instead of more of the same entities.

Between a raw export and a usable list

An export full of volume numbers still needs judgement before anyone writes against it. Three checks do most of that work.

Rank by intent before volume

Sorting a software development firm's keywords by volume alone put "ai companies" (15,000) and "crm companies" (1,200) at the top. Both mean companies that make those products, not firms that build them. A keyword naming the actual service, like "ai consulting firms" at 2,000, outranks a bigger one that doesn't.

Never pick a primary on traffic potential

Ahrefs credits traffic potential to a parent keyword, which is sometimes a different business entirely. "mobile companies" searched 500 times a month reported 5,360,000 because its parent was "t mobile". A simple ratio test flagged 749 of 1,487 primary keywords on one build, and those fell back to plain volume.

Sweep the business nouns

A list collected only on "agency" misses most of its own demand. Crossing every service with agency, company, services, studio and firm took one Awesomic plan from 46 pages on 34,160 searches to 108 pages on 174,290.

New keywords, one row at a time

After the universe is built, keywords keep arriving from sales calls, Search Console and competitor pages. For those, an n8n workflow reads each new row in the content plan, pulls up to 20 matching terms from Ahrefs sorted by volume, and has a model choose up to 10 secondary keywords, skipping brand names and anything too generic to target.

It runs inside the same workflow as content brief automation, so the secondary keywords arrive with the brief instead of in a separate sheet.

What you get back

The build ends in a keyword plan CSV and a short read of it:

  • Every surviving keyword with volume, difficulty and parent keyword, taken from the Ahrefs export because its figures match what you see on screen
  • A flag on any row whose traffic potential belongs to an unrelated parent
  • An intent tier per keyword, so service terms sort above vendor terms
  • A record of every filter and what it removed, so the headline number is never the unfiltered total
  • Paste-ready blocks for the next round, already de-duplicated

Keyword clustering is deliberately a separate job. Grouping these keywords into topics and mapping them onto your existing pages is what the topical content map does next.

Markets where this earns its setup

It is worth it when the market is bigger than one person's intuition: many services, many locations or many product types, where the combinations run into the thousands. It also fits when you already have a list you trust and want to find out what it is quietly missing.

It is overkill for a single product with a handful of obvious terms, where twenty minutes in Keyword Explorer will get you further than a generator. And it doesn't replace deciding which searches your business actually wants. It makes that decision faster to check.

What it costs to run

Keyword Explorer exports come with an Ahrefs subscription you probably already pay for, and the generation and merge scripts run locally at no cost. The n8n step spends a few Ahrefs API units and one small model call per keyword.

Keyword research runs under execution capacity, a flat $2,000 a month for the agents route, on top of a fractional Head of Content retainer. The first universe usually needs one to two weeks of generating and checking rounds.

Bring the keywords you already trust

Send the list your team built by hand, even a short one. It becomes the acceptance test, and on a call we'll walk through how a first generated round would be measured against it.

Want this built for your team?

Book a call and walk through what we'd adapt for your stack.