Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Keyword Clustering

Tools, libraries, models and research for grouping keywords by meaning

Because how to brew coffee and french press ratio share no words — and belong on the same page.

Awesome PRs Welcome License: CC0

A network of keyword clusters, each glowing node a content topic with its keywords in orbit

Keyword clustering is the problem of taking a flat list of search terms — often thousands of them, exported from Search Console or a keyword tool — and working out which ones belong together.

Get it right and the list becomes a content plan: one cluster, one page. Get it wrong and you write five pages that compete with each other for the same query, which is the single most common way sites quietly cannibalise their own rankings.

This list collects what people actually use to solve it: the commercial tools, the open-source building blocks to roll your own, the embedding models that do the real work, and the papers underneath all of it.

Contents

Why it's harder than it looks

The naive approach — group keywords that share words — fails immediately, and understanding why is most of the problem.

The trap Example
Same meaning, no shared words how to brew coffee · french press ratio · pour over guide
Shared words, different meaning apple pie recipe · apple watch battery
Same words, different intent running shoes (browse) · buy running shoes (purchase) · best running shoes 2026 (compare)
Long tail hides the signal 4,000 keywords, 3,600 of them appearing once

A good clustering respects meaning and intent. Two keywords can mean the same thing and still deserve separate pages, because the searcher wants a different kind of answer.

How much clustering actually matters — the cannibalisation case

When several of your pages target the same query, Google has to pick one. It often can't decide, so it rotates between them — and the tell is visible in your own Search Console data: pull Performance → Queries with the Pages dimension and look for queries where more than one URL takes impressions and the top URL changes week to week.

Each of those pages holds a fraction of the links, engagement and authority that one page would have held. Merging them is usually worth more than any amount of on-page optimisation on either one.

The two approaches

Almost every tool here does one of two things. They give genuinely different answers, and neither is strictly better.

SERP overlap Semantic similarity
How Fetch the top ~10 results for each keyword; cluster keywords whose result sets overlap Convert each keyword to a vector with a language model; cluster vectors that sit close together
Really measures Whether Google already treats these as the same query Whether the keywords mean the same thing
Strength Reflects the live SERP, so it captures intent as the engine sees it today Works on any list instantly, finds relationships with no shared words
Weakness Needs a SERP API call per keyword — slow, costly, rate-limited Can group things that read alike but rank differently
Cost shape Per keyword, forever Compute once, free thereafter
Fresh? Yes, as fresh as the last crawl Reflects language, not rankings

Hybrid approaches embed first to cut candidates, then verify a subset against the SERP — cheaper than pure SERP overlap, sharper than pure embeddings.

Tools

Pricing is qualitative because vendors change it constantly. Approach is as described by the vendor — corrections welcome.

Dedicated clustering tools

Tool Approach Price
Keyword Insights — groups by SERP similarity and intent, generates topical maps and content briefs SERP overlap Paid
Cluster AI — analyses SERP overlap to group keywords; deliberately narrow feature set SERP overlap Paid
Keyword Cupid — visualises keyword relationships as a dendrogram built from real Google results SERP overlap Paid
KeyClusters — groups by the top-ranking URLs, with an emphasis on identifying hub pages SERP overlap Paid
SE Ranking Keyword Grouper — clustering built into the wider SE Ranking suite SERP overlap Paid
Graph My Keywords — clusters by meaning in the browser and draws the result as a topic network with intent and volume per cluster; nothing is uploaded Embeddings Free

ℹ️ Disclosure: Graph My Keywords is maintained by the author of this list. It's listed on the same terms as everything else — free, and judged by the same columns.

Suites with clustering built in

Tool Approach Price
LowFruits — bulk SERP analysis to find weak spots, grouping by SERP overlap and semantic similarity Hybrid Freemium
Surfer Topical Map — suggests topic clusters for topical authority, with internal linking recommendations Semantic Paid
WriterZen — keyword research with clustering and topic discovery SERP overlap Paid
Ahrefs Keywords Explorer — "Parent Topic" groups keywords under the query that already ranks SERP-derived Paid
Semrush Keyword Manager — keyword lists with intent labels and grouping Mixed Paid

Adjacent and useful

Tool What it does
CanniWizard — finds cannibalisation by connecting your Search Console property
AlsoAsked — maps People Also Ask trees, which are intent clusters Google has already drawn
AnswerThePublic — question discovery, useful as clustering input
Keywords Everywhere — volume data in-browser, a common source for the CSV you cluster

Build your own

The whole pipeline is four steps — embed, reduce, cluster, label — and every step has a good open-source option.

Clustering and topic modelling

  • BERTopic — embed → UMAP → HDBSCAN → c-TF-IDF labelling, in one library. The closest thing to a default answer.
  • scikit-learn — KMeans, agglomerative, DBSCAN. Agglomerative with a distance threshold is often better than KMeans here, because you don't know k in advance.
  • HDBSCAN — density-based, finds the number of clusters itself, and labels genuine outliers as noise instead of forcing them somewhere.
  • UMAP — dimensionality reduction that preserves local structure; standard before density clustering, and what makes the 2D plot readable.
  • KeyBERT — extracts the keywords that best represent a document, useful for naming clusters.

Embeddings and inference

  • sentence-transformers — the reference implementation for sentence embeddings, and where most of the good models live.
  • Transformers.js — runs the same models in the browser via ONNX and WASM. This is what makes client-side clustering possible at all, with no upload and no server.
  • FAISS — similarity search at scale, when pairwise comparison stops being viable.
  • hnswlib · Annoy — lighter approximate nearest-neighbour libraries.
  • Gensim — the classical route: word2vec, LDA, TF-IDF.
  • spaCy — tokenisation, lemmatisation and the normalisation you need before any of this works properly.
The two mistakes everyone makes first

A fixed similarity threshold. A cosine cut-off of 0.6 looks sensible on one dataset and produces a single giant cluster on another. Median nearest-neighbour similarity varies enormously by niche — a tight vocabulary like coffee sits far higher than a broad one like finance. Derive the threshold from the distribution of the data in front of you rather than hard-coding it.

Centroid drift. If you add items to a cluster and recompute its centre as you go, the centre wanders. The last keyword admitted can be unrelated to the first, and you end up with one enormous grab-bag cluster. Seed the centroids, then freeze them before the assignment pass.

Embedding models

Small models are usually the right call: keywords are short, and a 23MB model that runs anywhere beats a 2GB model that needs a GPU.

Model Size Notes
all-MiniLM-L6-v2 ~23 MB The workhorse. Fast enough to run in a browser tab, good enough for short text.
all-mpnet-base-v2 ~420 MB Noticeably better quality when you have the compute.
bge-small-en-v1.5 ~130 MB Strong small model; benefits from a query prefix.
gte-small ~130 MB Competitive with much larger models on short text.
paraphrase-multilingual-MiniLM-L12-v2 ~470 MB 50+ languages, when your keywords aren't English.

MTEB Leaderboard — compare models on retrieval and clustering benchmarks rather than on vibes.

Visualisation

A cluster list is a spreadsheet. A cluster map is something people understand at a glance and screenshot.

  • Cytoscape.js — graph rendering and layout for the web; the fCoSE layout handles clustered graphs particularly well.
  • 3d-force-graph — force-directed graphs in 3D on top of Three.js.
  • Sigma.js — built for large graphs, WebGL-rendered.
  • D3 — when you want to draw exactly what you have in mind.
  • Gephi — desktop graph analysis; give it an edge list and it will find communities for you.
  • Graphviz — for hierarchies and dendrograms rather than networks.

Papers and reading

Where to get keywords

Everything above needs a list. These are the usual sources, roughly in order of how much you should trust the volume figures.

  • Google Search Console — free, and the only source that reflects what your site already gets impressions for. Rare queries are withheld for privacy, so totals run short.
  • Google Keyword Planner — free with an Ads account. Volumes are bucketed into ranges unless you're spending.
  • Bing Webmaster Tools — free, and generous with keyword data.
  • Google Trends — relative interest over time, good for spotting a category's vocabulary shifting.
  • Ahrefs, Semrush, Moz and similar — paid, larger indexes, modelled volumes.

Related lists

Contributing

Additions, corrections and arguments about the "Approach" column are all welcome — see CONTRIBUTING.md. If a tool is described wrongly here, please say so; a table that quietly misrepresents a competitor is worse than no table.

License

CC0 1.0 — public domain. Take it, fork it, no attribution needed.

About

A curated list of keyword clustering tools, libraries, embedding models and papers - with the SERP-overlap and semantic approaches compared.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors