Most keyword research tools want your credit card. Ahrefs, SEMrush, KeywordTool.io — powerful, but if you are a new blogger, spending money on SEO tools before you have traffic makes no sense.
Here is the secret those tools do not advertise: several of them are built on top of something completely free — Google Autocomplete. Every time you type in the Google search bar and it finishes your sentence, Google is showing you what real people actually search for. In this post I will give you a small Python script that collects hundreds of those suggestions automatically. It needs no API key, no paid tool, and no installation — just Python itself.
Why Autocomplete Is a Goldmine for New Blogs
Autocomplete suggestions are pulled from real search behavior. That gives you two things a new blog desperately needs:
- Proof of demand. If Google suggests it, people are typing it. You are never guessing whether a topic has an audience.
- Long-tail phrases. Suggestions are naturally longer and more specific ("ai tools for students free") than head terms ("ai tools"). A brand-new blog cannot rank for head terms — but long-tail phrases with lower competition are winnable.
The Script (Copy, Paste, Run)
Save this as keyword_finder.py, change the SEED word to your topic, and run it with python keyword_finder.py. It uses only Python's standard library — nothing to install.
import json
import time
import urllib.parse
import urllib.request
SEED = "ai tools" # change this to your topic
def get_suggestions(query):
url = ("https://suggestqueries.google.com/complete/search"
"?client=firefox&q=" + urllib.parse.quote(query))
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
with urllib.request.urlopen(req) as r:
data = json.loads(r.read().decode("utf-8", errors="ignore"))
return data[1] # list of suggestion strings
def main():
prefixes = ["how ", "what ", "why ", "can ", "best ", "free "]
letters = [" " + c for c in "abcdefghijklmnopqrstuvwxyz"]
queries = [SEED] + [p + SEED for p in prefixes] + [SEED + l for l in letters]
found = []
for q in queries:
try:
for s in get_suggestions(q):
if s.lower() != SEED and s not in found:
found.append(s)
except Exception as e:
print("skipped:", q, "->", e)
time.sleep(1) # be polite so Google doesn't block you
with open("keywords.csv", "w", encoding="utf-8") as f:
f.write("keyword\n")
for kw in found:
f.write(kw + "\n")
print(f"Done! {len(found)} keyword ideas saved to keywords.csv")
if __name__ == "__main__":
main()
Open the resulting keywords.csv in Excel or Google Sheets and you will have a few hundred real search phrases around your topic.
How the Script Works (in Plain English)
The magic is in how we ask. One query to Autocomplete returns only about 10 suggestions. So the script multiplies your seed keyword three ways:
- The seed itself — "ai tools" → the 10 most popular completions.
- Question and intent prefixes — "how ai tools", "best ai tools", "free ai tools" → surfaces question-format and buyer-intent phrases, which make perfect blog titles and FAQ headings.
- The alphabet trick — "ai tools a", "ai tools b" … "ai tools z". Each letter forces Google to reveal a different set of completions. Twenty-six letters times ten suggestions is where the volume comes from.
The time.sleep(1) line matters: it waits one second between requests. Hammering Google with rapid requests can get your IP temporarily blocked. One polite second keeps you safe, and the whole run still finishes in about half a minute.
How to Pick Winners from the List
A few hundred keywords is raw material, not a strategy. Here is a simple filter for a new blog:
| Keep | Skip |
|---|---|
| 4+ word phrases ("free ai tools for students 2026") | 1–2 word head terms ("ai tools") |
| Question formats ("can ai tools write essays") | Brand-only searches ("chatgpt login") |
| Phrases matching what you can genuinely teach | Topics you would just be guessing about |
| Phrases where page-one results look weak or outdated | Phrases dominated by huge sites and official docs |
That last row is the manual step no script replaces: search your candidate phrase in an incognito window and look at page one. If the results are thin forum threads or articles from two years ago, you have found a gap. This exact process is how I choose topics for this blog — I built my publishing workflow around automation, which I explained in my post on auto-drafting blog posts free with the Gemini API and Apps Script, and this keyword script is the front end of that same pipeline.
Level Up: Keywords in Your Language, and for YouTube
Two small changes to the URL inside the script unlock features even some paid tools charge for.
1. Research in any language. Add an hl parameter to target a specific language and market. For example, change the URL line to end with:
"?client=firefox&hl=hi&q=" + urllib.parse.quote(query)
Now you get suggestions as Hindi users see them (hl=ne for Nepali, hl=es for Spanish, and so on). If you blog for a regional audience, this is huge: competition for non-English long-tail keywords is usually far lower, while the search demand is real. Most Western SEO tools serve this data poorly or charge extra for it — the endpoint gives it to you free.
2. Research YouTube instead of Google. Add ds=yt to the URL:
"?client=firefox&ds=yt&q=" + urllib.parse.quote(query)
Now the suggestions come from YouTube's search bar. People search differently on YouTube ("...tutorial", "...explained", "...in 5 minutes"), so if you make videos as well as blog posts, run the script twice — once per platform — and you have two content calendars from one seed keyword.
Practical Takeaway
Run the script once per topic idea, keep a master spreadsheet, and highlight every question-format phrase — those become your post titles and FAQ sections. Ten minutes of this before writing beats hours of guessing what people want to read. Free beats paid when you are starting; upgrade to paid tools only when your traffic proves the blog deserves the investment.
FAQ
Is the Google Autocomplete API free to use?
There is no official public API, but the suggestion endpoint that browsers use is freely accessible, and small polite scripts like this one are how many free keyword tools work behind the scenes. Keep the one-second delay and use it for research, not mass scraping.
Can I do keyword research without paid SEO tools?
Yes. Autocomplete (this script), Google's "People also ask" boxes, "Related searches" at the bottom of results, and Google Search Console (once your blog has some traffic) together cover most of what a new blogger needs — all free.
How do I find long-tail keywords for a new blog?
Use the alphabet trick from this script: append each letter a–z to your seed keyword and collect the completions. Long-tail phrases with 4+ words and question formats are the easiest wins for a site with no authority yet.
Will Google block this script?
Not if you are polite. The built-in one-second delay keeps your request rate human-like. If you ever see errors, increase the delay to two seconds. Avoid running it in a loop hundreds of times per day.
Join the conversation
Post a Comment