← Volver al Journal
· 5 min de lectura

Python SEO Keyword Research: From Autocomplete to Priority Matrix

Stop paying $200/month for keyword research tools. Here's how to build a complete keyword research pipeline in Python — from Google Autocomplete mining to SERP difficulty scoring — using only the standard library.

Most keyword research tutorials go like this: “Open Ahrefs, type a seed keyword, sort by difficulty, pick the easy ones.” That’s not a tutorial — it’s a product walkthrough. It teaches you nothing about how keyword research actually works.

Here’s the real version: a complete Python pipeline that takes you from zero to a prioritized keyword list, using only free APIs and the Python standard library. No Ahrefs. No Semrush. No $200/month subscription.

The Pipeline Overview

Seed Keywords

Google Autocomplete (expand)

Bing Webmaster API (volume)

SERP Analysis (difficulty)

Cluster & Score

Priority Matrix

Each step takes raw input and produces structured output. You can run the whole thing in one command, or step through each stage.

Step 1: Expand Seeds with Google Autocomplete

Google’s autocomplete API is the best free keyword source that exists. Every suggestion comes from real search behavior — not a database estimate, not a third-party scrape, actual what-people-type data.

# Basic expansion
python3 -m zens_ink.keyword_research "seo tools"

# Recursive expansion (A-Z method)
python3 -m zens_ink.keyword_research "seo tools" --expand

The --expand flag runs the A-Z method: it appends each letter to your seed keyword and collects all suggestions. This is the same technique Keywords Everywhere and AnswerThePublic use, except free.

Sample output from python3 -m zens_ink.keyword_research "python seo":

python seo
python seo script
python seo tools
python seo audit
python seo keyword research
python seo automation
python for seo pdf
python for seo course
python web scraping seo
python seo crawler

That’s 10 keywords from one seed, zero API calls to paid services. Run it with --expand and you get 50-100 variants.

Tips for Better Seeds

Your seed keywords determine the quality of expansion. Don’t just use your product name:

  • Pain point seeds: “keyword research without ahrefs”, “free seo audit”
  • Format seeds: “python seo script”, “seo cli tool”
  • Comparison seeds: “ahrefs vs semrush”, “free ahrefs alternative”
  • Question seeds: “how to check keyword difficulty”, “how to do seo for”

Each seed generates a different branch of the keyword tree. 5 good seeds × 50 expansions = 250 keywords to work with.

Step 2: Get Search Volume

Google Autocomplete tells you what people search. It doesn’t tell you how often. For volume data, use the Bing Webmaster API — it’s free, gives you actual search counts (not estimates), and covers Bing’s ~3 billion monthly searches.

# Set up (one time)
# 1. Register at bing.com/webmasters
# 2. Add your site and verify
# 3. Get your API key from Settings → API access

# Query volume
python3 -m zens_ink.keyword_volume \
  --keywords "python seo,seo cli tool,free seo audit" \
  --api-key YOUR_BING_KEY

Output:

Keyword                  Monthly Volume
python seo               480
seo cli tool             170
free seo audit           2,900
python seo script        90
python keyword research  140

Bing volumes are lower than Google’s (Bing has ~3% of Google’s search volume), but the relative proportions are accurate. If “free seo audit” gets 20× more volume than “seo cli tool” on Bing, the same ratio holds on Google.

When Bing Volume Is Zero

Bing’s API returns 0 for very low-volume or very new keywords. This isn’t a bug — it’s a signal. If Bing shows 0, Google probably shows < 10 monthly searches. These are either ultra-long-tail (safe to skip) or emerging terms (worth monitoring).

For a comprehensive guide to using GSC data alongside Bing, see our Google Search Console SEO guide.

Step 3: Score SERP Difficulty

Now you have keywords with volume. The next question: can you actually rank?

Most tools answer this with a single “Keyword Difficulty” number from 0-100. Ours doesn’t. Instead, we analyze the actual SERP structure for each keyword.

# SERP analysis for a keyword
python3 -m zens_ink.kd_analysis "python seo script" \
  --serp-api-key YOUR_SERPER_KEY

The analysis reads the top 10 results and evaluates:

Homepage ratio. Are people searching for a specific site (navigational) or information? If 7/10 results are root domains, skip — it’s a brand query. If most are inner pages, content can win.

Platform density. Reddit, YouTube, Quora, Medium in the top 10? Good sign. These are user-generated content, not purpose-built pages. A dedicated article can outrank them.

Domain age profile. Sites registered in the last 2 years appearing in the top 10? Google is still testing — get in early.

Content match. Does the ranking page actually answer the search query? If the top results are tangential, there’s a content gap to exploit.

For the full methodology behind this approach, see our SERP Analysis vs Domain Rating guide. The short version: SERP structure predicts difficulty better than any domain-level metric.

Step 4: Cluster Keywords

100 keywords is a spreadsheet. 100 keywords grouped into 10 topical clusters is a content plan.

# Cluster keywords by semantic similarity
python3 -m zens_ink.competitor_gap \
  --keywords keywords.txt \
  --cluster

Clustering groups keywords that share terms, intent, or search context. For example:

Cluster: "python seo tools"
  - python seo script
  - python seo tools
  - python seo automation
  - python web scraping seo
  - python seo crawler

Cluster: "free seo audit"
  - free seo audit tool
  - free seo audit online
  - seo audit free
  - website seo check free

Each cluster becomes one article or one pillar page. This is how you build topical authority — not by writing random articles, but by systematically covering topic clusters.

Step 5: Build the Priority Matrix

Now you have everything: keywords, volume, difficulty, and clusters. The priority matrix turns this into action.

Score each keyword on three axes:

  • Volume (how many people search)
  • Winability (how hard to rank)
  • Relevance (how closely it matches your product)
High Volume + Easy + Relevant  → Write this week
High Volume + Hard + Relevant  → Long-term pillar content
Low Volume + Easy + Relevant   → Quick wins, write when time allows
Low Volume + Hard + Relevant   → Skip
Irrelevant                     → Skip regardless

This is the same matrix we use for our content strategy workflow. The difference: you built it with free tools and Python, not a $200/month subscription.

A Real Example

Let’s trace one keyword through the full pipeline.

Seed: “python seo”

Autocomplete expansion (47 variants, including “python seo script”, “python seo automation”, “python seo audit”)

Volume check: “python seo” = 480/mo (Bing), “python seo script” = 90/mo

SERP analysis of “python seo script”:

  • Top 10: 3 Medium posts, 2 GitHub repos, 2 small blogs, 3 generic SEO tool pages
  • Homepage ratio: 1/10 (only GitHub is close to homepage)
  • Platform density: 5/10 are user-generated
  • Assessment: Easy. Content-focused pages dominate. A dedicated, well-structured guide can rank.

Cluster: Belongs in “Python SEO Tools” cluster alongside “python seo automation”, “python seo crawler”

Priority: High relevance (matches our product) + Easy difficulty + Low volume → Quick win. Write it.

This keyword became this article. The pipeline works.

What This Replaces

ToolMonthly CostWhat It Does
Ahrefs$229Keyword research, difficulty, volume
Semrush$249Same, different database
Keywords Everywhere$2.50+Autocomplete volume
Serpstat$69Keyword clustering
This pipeline$0All of the above

The only paid API you might want is a SERP endpoint (Serper.dev gives 2,500 free lookups/month). Everything else uses free APIs or the Python standard library.

Next Steps

The full pipeline is available in the ZensInk SEO toolkit. Clone, run, and stop paying for keyword data that’s available for free.

Want to run this analysis on your own site?

ZensInk Pro automates this pipeline. One command, from seed keywords to content plan.

Get Pro →