SEO & SERP 9 min read

Web Scraping Keywords from Google for SEO

Scrape keyword data from Google: autocomplete suggestions, related searches, and volume stats to expand your semantic core. See methods and tools that work.

ST
Scraping.Pro Team
Data collection for business needs
Published: 24 June 2025

Web Scraping Keywords from Google for SEO

If your traffic comes from Google — and for most niches in the US, UK, Australia, Canada, and worldwide it does — your keyword list should be built from Google's own demand data, not guesswork. Web scraping keywords means collecting, automatically and at scale, the exact phrases people type into the search box, how often they search them, and the related queries that cluster around them. Done well, keyword scraping turns a handful of seed ideas into a full semantic core: hundreds or thousands of real search terms you can map to pages. This guide covers where Google keyword data lives, how to scrape Google suggestions with a short Python script, how to avoid getting blocked, and which tools actually do the job.

Why scrape keywords instead of brainstorming them

A semantic core (or keyword universe) is the complete set of queries a site should rank for. Build it by hand and you capture the obvious head terms and miss the long tail — the specific, lower-competition phrases that convert. Google already knows those phrases because people type them every day. Scraping surfaces them systematically:

  • You discover long-tail variations you'd never think of.
  • You get search volume to prioritize what's worth targeting.
  • You find question-format queries that map cleanly to content and FAQs.
  • You spot competitor keywords you're not yet ranking for.

The output feeds everything downstream — site structure and page mapping, title and meta generation, and rank tracking once pages are live.

Where to find Google keyword data

Google exposes keyword demand through several surfaces. Each has different coverage, so a serious keyword list pulls from more than one.

Google Keyword Planner. The native source for search volume. Living inside Google Ads (free to sign up), it returns volume ranges, forecasts, keyword ideas, and the ability to pull terms for a given URL or competitor domain. It's the closest thing to ground truth for how often a phrase is searched. Two caveats: volume is bucketed into ranges unless you run active campaigns, and for heavy automated pulling you should use a dedicated account with delays between requests so you don't trip limits on your main one.

Google autocomplete (Suggest). The dropdown that appears as you type is a goldmine of "live," long-tail phrasing. You harvest it by feeding Google seed queries plus letter-by-letter permutations. More on the exact method below.

Related searches. The block of adjacent queries at the bottom of a results page. Great for topic expansion and finding the next cluster to build out.

People Also Ask (PAA). The expandable question boxes in the SERP. Scraping these gives you a ready-made list of the questions your audience asks — perfect for FAQ sections and question-led content. Tools like AlsoAsked and AnswerThePublic specialize in mapping these out.

Google Trends. Doesn't give absolute volume, but shows relative interest over time, seasonality, and rising/breakout queries. Use it to time content and catch trends early.

Google Search Console. The real queries your own site already shows and gets clicks for. Limited to your property, but it's the highest-quality data you'll ever get because it's your actual audience.

Competitor keyword gaps. The queries rival sites rank for that you don't. This is where paid platforms earn their keep — they maintain huge keyword indexes and diff two domains for you.

Source What you get Cost Best for
Keyword Planner Volume ranges, forecasts, ideas Free Volume + commercial intent
Autocomplete (Suggest) Long-tail, "live" phrases Free Long-tail discovery
Related searches Adjacent topics Free Topic/cluster expansion
People Also Ask Question-format queries Free FAQ and question content
Google Trends Interest over time, rising terms Free Seasonality, trending topics
Search Console Your real ranking queries Free (your site) Existing performance
Competitor gaps Rivals' keywords you miss Paid tools Finding missed phrases

How to scrape Google autocomplete suggestions

Autocomplete is the easiest Google source to collect yourself because there's a lightweight endpoint that returns clean JSON:

code
https://suggestqueries.google.com/complete/search?client=firefox&q=YOUR+QUERY

With client=firefox, the response is a simple array: ["your query", ["suggestion 1", "suggestion 2", ...]]. To go wide, don't just query your seed — append each letter (a–z) and digit (0–9) so Google completes "web scraping a…", "web scraping b…", and so on. This "alphabet soup" trick multiplies the phrases you pull back.

Here's a small, runnable Python example that iterates seeds and alphabet expansions, dedupes, and saves to CSV:

python
import csv
import time
import random
import string
import requests

SUGGEST_URL = "https://suggestqueries.google.com/complete/search"

def get_suggestions(query, lang="en", country="us"):
    params = {
        "client": "firefox",   # returns clean JSON
        "q": query,
        "hl": lang,
        "gl": country,
    }
    headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"}
    resp = requests.get(SUGGEST_URL, params=params, headers=headers, timeout=10)
    resp.raise_for_status()
    # Response shape: ["query", ["suggestion 1", "suggestion 2", ...]]
    return resp.json()[1]

def expand(seed):
    """Yield the seed plus 'seed a' ... 'seed z' and 'seed 0' ... 'seed 9'."""
    yield seed
    for ch in string.ascii_lowercase + string.digits:
        yield f"{seed} {ch}"

def harvest(seeds):
    found = set()
    for seed in seeds:
        for query in expand(seed):
            try:
                for suggestion in get_suggestions(query):
                    found.add(suggestion.lower())
            except requests.RequestException as e:
                print(f"skip '{query}': {e}")
            time.sleep(random.uniform(1.0, 3.0))  # jitter between calls
    return sorted(found)

if __name__ == "__main__":
    seeds = ["web scraping", "keyword research", "price monitoring"]
    keywords = harvest(seeds)
    with open("google_suggestions.csv", "w", newline="", encoding="utf-8") as f:
        writer = csv.writer(f)
        writer.writerow(["keyword"])
        for kw in keywords:
            writer.writerow([kw])
    print(f"Saved {len(keywords)} unique suggestions")

A few things to know. This Suggest endpoint is undocumented — Google can change or throttle it without notice, so treat it as best-effort rather than a supported API. The hl and gl parameters set language and country, which matters because suggestions are localized: "boot" in the UK and the US surface different completions. And keep the jitter in — hammering the endpoint from one IP is the fastest way to get temporarily blocked. If you want the results to land somewhere your team can use immediately, it's trivial to swap the CSV writer for a push straight into Google Sheets.

Getting past Google's defenses

The catch with Google keyword scraping — whether you're pulling suggestions, the SERP, related searches, or PAA — is that Google actively fights automated collection. Scale up naively and you'll hit CAPTCHAs, empty responses, or IP bans. The countermeasures are well understood:

  • Rotating proxies. Spread requests across many IPs so no single address looks like a bot. Rotating residential proxies are the standard tool here; datacenter IPs get flagged faster.
  • User-Agent rotation. Vary the browser fingerprint you send rather than repeating one string. See User-Agent rotation for a maintained pool.
  • Delays and jitter. Randomize the gap between requests (as in the script above) so your timing doesn't look mechanical. Never fire in a tight, evenly spaced loop.
  • Respect rate limits. Back off when you get 429s or CAPTCHAs instead of retrying immediately. When you do hit a CAPTCHA, solving CAPTCHAs programmatically is possible but adds cost and fragility.

For anything beyond small autocomplete pulls, the reliable path is a SERP API — a service that handles proxies, headless browsers, and CAPTCHA solving behind a single call and returns structured JSON. It costs money, but it removes the entire anti-block treadmill and won't break every time Google tweaks its markup. That's exactly what dedicated scraping Google search results tooling is for.

The iterative collection technique

One method separates a thorough keyword list from a shallow one: collect in rounds. Pull an initial batch, sort by search volume, take the highest-volume terms, and turn those into a fresh, expanded set of seed markers. Feed them back through autocomplete and your tools, and each pass surfaces phrases the previous round didn't reach. Two or three iterations typically move you from a few hundred keywords to a genuinely complete core. Pair it with region targeting in Keyword Planner — pull with "All locations" and clean out irrelevant cities afterward, or set the target country up front for a tighter, more accurate list.

Google keyword scraping tools: free vs paid

You don't have to script everything. Plenty of tools wrap these sources in a UI. Here's how the globally available ones stack up.

Tool Type Strengths
Google Keyword Planner Free Native volume, forecasts, keyword ideas
Google Search Console Free Your own real query and click data
Google Trends Free Trend and seasonality signals
AnswerThePublic Freemium Question and preposition maps from autocomplete
AlsoAsked Freemium People Also Ask question trees
Keyword Tool Freemium Autocomplete at scale (Google, YouTube); volume behind paywall
Mangools (KWFinder) Paid (budget) Affordable volume + keyword difficulty
Serpstat Paid (mid) Related/missing keywords, competitor and SERP analysis
Ahrefs Paid (premium) Deep competitor keyword and backlink data
Semrush Paid (premium) All-in-one keyword and competitive research

For a small project, the free stack — Keyword Planner + autocomplete + Search Console + Google Trends — gets you a long way at zero cost. For serious volume, competitor gap analysis, or ongoing programmatic collection, you'll want paid tools and real scraping infrastructure. Mid-tier options like Mangools or Serpstat cover most needs; Ahrefs and Semrush are the premium end for deep international research.

Is it legal to scrape Google keywords?

Scraping public search data sits in a legal gray area rather than being clearly illegal. Google's Terms of Service discourage automated access, so scraping can breach the ToS (a contractual matter) even when the data itself is public. On the other side, US courts have generally been reluctant to treat scraping of publicly available data as a computer-crime violation — the long-running hiQ Labs v. LinkedIn case narrowed how the Computer Fraud and Abuse Act (CFAA) applies to public pages. The practical takeaway: keyword volumes and suggestions are public information many teams collect routinely, but you should scrape responsibly, avoid personal data, respect rate limits, and — if there's real money or risk involved — get your own legal advice. This isn't it.

If you'd rather skip the proxies, CAPTCHAs, and maintenance entirely, scraping.pro runs Google SERP scraping as a done-for-you service — structured keyword, suggestion, and results data delivered on a schedule — and can build a custom data extraction service around whatever sources your keyword research needs.

FAQ

Is it legal to scrape Google keywords? It's a gray area. The keyword data is public, and courts (notably hiQ v. LinkedIn under the CFAA) have limited claims against scraping public pages — but automated access can still violate Google's Terms of Service. Scrape public data only, respect rate limits, and seek legal advice for high-stakes projects.

How do I scrape Google autocomplete suggestions? Call the Suggest endpoint https://suggestqueries.google.com/complete/search?client=firefox&q=YOUR+QUERY, which returns JSON. Expand each seed with letters a–z and digits 0–9 to pull more completions, dedupe the results, and add delays between requests. The short Python script above does exactly this.

Can I scrape a website for keywords? Yes — to find the terms competitors target, you can scrape their pages for titles, headings, and on-page copy, or use a tool like Ahrefs/Semrush that already indexes which keywords a domain ranks for. Combining "scrape website for keywords" with Google's own sources gives you both what rivals rank for and what searchers actually type.

What are the free ways to get keyword data? Google Keyword Planner (volume and ideas), Google autocomplete (long-tail phrases), related searches and People Also Ask (topics and questions), Google Trends (seasonality), and Google Search Console (your own real queries) are all free. Together they cover most keyword research without a paid subscription.

Why does my scraper keep getting blocked? You're likely sending too many requests from one IP with one User-Agent and no delay. Add rotating proxies, rotate your User-Agent, randomize timing, back off on 429s and CAPTCHAs, or move to a SERP API that handles all of this for you.