Keyword Clustering and Grouping

Need better organic traffic? Find the most important keyword topics with cluster analysis.

Both for SEO and PPC managers, keyword grouping and clustering is a powerful technique for keyword research. Keyword grouping will help you see the whole picture and drive organic traffic to your website.

Keyword clustering and grouping solutions

WHEN TO USE KEYWORD CLUSTERING
IN YOUR KEYWORD RESEARCH?

You want to explore a new keyword set

Let’s say someone is sending you a file with 500,000 keywords to create an SEO content strategy. Understanding the status quo clustering techniques, help you better understand what the main searches are. 

Want a head start? N-Gram Analysis of your keywords will be perfect for your next project. N-Gram analysis of your keywords are also a great starting point.

You want to get keyword topics in short time

Grouping your keywords with cluster algorithms will give you the main ideas of keyword topics. When you put these keyword clusters in hierarchical order, you are able to build an SEO content strategy with big main topics and linked subtopics. Thanks to cluster algorithms, you won’t spend much time and effort. Besides, you’ll get quick results compared to other keyword research approaches like powerful keyword tagging.

HOW DOES THE KEYWORD CLUSTERING WORK IN 4 STEPS?

1) Keyword Preprocessing

First, you should bring your keywords to lowercase and remove special characters with some RegEx operations. Split your full keyword into single words and use stemming functions like Porter or Snowball Stemmer. It’ll reduce every word to their root form and makes it possible to group similar words.

3) Choose a clustering algorithm

You can choose between a lot of different clustering algorithms. K-means clustering is one of the most powerful methods. How can you figure out the number of clusters you need to create? No worries, the “K” stands for it. Sometimes estimating the number of clusters can be difficult. To avoid it, you can use approaches like DBSCAN and tweak some parameters here.

2) Transform your keywords to vector space

Cluster algorithms run on numeric data. For that reason, we have to transform all keywords into a vector space. Scikit has modules that will do most of the job. We recommend using TfidfVectorizer for the feature extraction from your keywords. It’s using Tf-Idf numbers as weightings for each word within your vector.

4) Export Keyword Groups in an actionable way

In the end, it’s all about using the results of the cluster analysis for actions. For some use cases, exporting the full keywords to a CSV file is fine. Put the cluster name in one column, and concatenate all assigned keywords with a delimiter together. Then show them in the second column. If you like visualizations more, you can create a word cloud per cluster and arrange to show them next to each other.

Similar keywords grouped together
For SEO, PPC, Amazon, YouTube and eBay
From niche keywords into bigger groups
Download your grouped keywords
keyword grouping tool

FREE KEYWORD SOURCES TO RUN CLUSTERING

Autosuggest Keyword Source

Probably, you think Google Autosuggest is the first step to create various keywords. It’s just one method you can try. Feel free to have a look at our free Google Autosuggest tool to scrape keywords. For sure, finding relevant keywords to Autocomplete will positively impact your performance. Otherwise, the user experience would be bad within the search engine. We always wonder why many queries never appear when you look at the search volume of a keyword. Time to think the significance of Google Autocomplete. 

Your PPC Queries as Keyword Source

It’s a great source if you use the existing queries within your Google Ads account. Especially for SEO people, it’s difficult to quantify a keyword, based on business value. Don’t worry. We can achieve it by using conversion metrics in paid search. You’ll realize that the focus on search volume isn’t the best way. There will be many hidden long-tail keywords when it comes to a transaction-based perspective. Optimize for these keywords to increase the value of your traffic.

Keyword Planner

The Google Keyword Planner is another good resource for getting new keywords. You can access it with ease from your Google Ads account. It will help you find new keywords to spend money on. Of course, you can also try it for your SEO projects. A nice recent add-on was the “refine” keywords option. Google is clustering the suggested keywords by entities they are recognized. Besides, they are in a generic way that fits all businesses out there. 

Google Trends

Google Trends is another great source for free keyword ideas. There is no official API available, but with the Python module Pytrends, you can query Google Trends in an automated way. It allows you to identify trending search queries for your business. If you know these trends, you can be the first person who provides the perfect content pages to match those queries. The competition is probably lower, and easier to get some organic rankings.

PYTHON SCRIPTS FOR GROUPING AND CLUSTERING

SEO Keyword Clustering

seo keyword clustering

Cluster your SEO or PPC Keywords with this Python script with less than 50 lines of code. The basic concepts are used:

  • Stemming of queries
  • Use TfidfVectorizer for feature extraction
  • Run a cluster algorithm on word vectors

Semantic Keyword Clustering

semantic keyword clustering

Cluster your keywords semantically by making use of this simple Python script.

  • Scrape SERPs for your Keyword set
  • Create a Network Graph by using the relation of keywords and their ranking URLs
  • Detect Communities within the Graph (Semantic Keyword Clusters)
  • Store everything into SQLite Database
Menu