Google is the biggest scraper on the planet — and it does not want to be scraped in return. That tension is exactly why building a reliable Google scraper is harder than scraping almost any other site: aggressive rate detection, CAPTCHAs, and markup that changes without warning. This guide gives you practical, current tips for scraping Google search results, why sites block you, how to reduce that, and when you should stop rolling your own and use a SERP API instead.
A quick, honest caveat up front: automated scraping of Google search results is against Google's Terms of Service. The techniques below are widely used for SEO research, rank tracking, and market analysis, but understand the terms and your local laws before you run anything at scale.
Why scrape Google at all?
The search results page (SERP) is a goldmine for legitimate work: tracking keyword rankings, monitoring competitors, harvesting "People also ask" questions, gathering local-pack and shopping data, and studying how the SERP itself is changing (AI overviews, featured snippets, and the rest). If you need that data programmatically, you either scrape the SERP or pay a SERP API to do it for you. For a broader look, see SEO scraping and rank tracker scraping.
How Google search URLs work
Every Google query is just a URL with parameters, which is what makes automation possible in the first place. The core one is q (the query). A search for "white doves" is simply:
https://www.google.com/search?q=white+doves
Other parameters you will use:
hl— interface language (e.g.hl=en).gl— country of the search (e.g.gl=us), important for localized results.start— pagination offset:start=10is page 2,start=20is page 3, and so on.
Because these are plain URLs, you can generate them in bulk. If you have thousands or millions of queries — a common need — build the URL list programmatically (often with a template and a keyword file) and feed them into your scraper. Most scraping frameworks accept an external list of URLs as input; when picking a tool, favor one that takes a URL feed so you are not hardcoding queries.
A dead trick to unlearn: older guides told you to append
&num=100to pull 100 results in one request. Google curtailed support for thenum=100parameter in 2025, so a single request now returns roughly a page of results (about 10). Plan on paginating withstartrather than grabbing 100 at once — and expect this kind of behavior to keep changing.
The core problem: rate limits and detection
Google watches for patterns that do not look human. Send too many requests too fast from one IP, and it will throw a CAPTCHA, then temporarily block you. That is the wall every DIY Google scraper hits. Everything below is about staying under that radar.
1. Proxies are non-negotiable
To scrape more than a trickle you must spread requests across many IP addresses using rotating proxies. Two big updates to the old advice:
- Use residential or mobile proxies, not cheap datacenter IPs. Google recognizes and distrusts datacenter ranges; residential IPs (real consumer addresses) blend in far better. The old recommendation of generic "high-anonymous proxies" is not enough today.
- Rotate intelligently. Change IP on a schedule that matches your query volume, and retire any IP the moment it starts drawing CAPTCHAs. Old numeric rules of thumb (a fixed "50–150 proxies," "under 500 requests per IP per day") are only loose starting points — the safe rate depends on proxy quality and current detection, so tune empirically and back off hard when you see challenges.
If you do not have enough clean IPs to sustain your target rate without triggering blocks, slow down. Pushing through detection just burns proxies and data quality.
2. Control your request rate and behave like a browser
- Add randomized delays between requests instead of hammering at machine speed.
- Send a realistic, current User-Agent and a full, consistent set of browser headers.
- Manage cookies deliberately: rotate or clear them alongside IP changes so a session does not tie many queries to one identity. (The old "always disable cookies" advice is crude — the goal is simply not to look like one machine making thousands of queries.)
- Do not over-thread. Flooding Google with parallel requests is the fastest route to a block. Modest concurrency with good delays beats brute force.
3. Handle CAPTCHAs as a warning sign
A CAPTCHA (or a "unusual traffic" page) means you have been detected. The right first response is to back off: pause, rotate to a fresh IP, and lower your rate. If you must keep going, route challenges through a CAPTCHA solving service — but treat frequent CAPTCHAs as a signal that your proxies or pacing need fixing, not something to brute-force through.
4. Geo-target correctly
Google results are heavily localized. If you need rankings for a specific country or city, set gl (and hl), and use proxies located in that region. A US-based IP asking for gl=uk results still skews the data — match the proxy location to the target market.
Parsing the SERP
Once you have the HTML, you extract results by selecting the DOM elements for each organic listing — title, URL, and snippet — plus any features you want (ads, "People also ask", local pack, shopping, AI overviews).
The hard truth: Google's SERP markup changes constantly and uses obfuscated, rotating CSS class names to make scraping brittle. Selectors that work today can break next week. Practical defenses:
- Anchor on stable structures (heading + nearby link) rather than fragile generated class names.
- Build in monitoring so you notice the moment your parser's output goes empty or malformed.
- Expect to maintain selectors continuously — this is the single biggest hidden cost of a DIY Google scraper.
For selector technique in general, see CSS selectors for web scraping.
DIY scraper vs. SERP API
You have two real paths.
| DIY Google scraper | SERP API | |
|---|---|---|
| Proxies | You buy, rotate, and babysit them | Handled for you |
| CAPTCHAs | Your problem | Handled for you |
| SERP markup changes | You fix selectors constantly | Provider absorbs it; you get structured JSON |
| Setup time | High | Minutes |
| Cost model | Proxies + solving + your engineering time | Pay per search/result |
| Best for | Full control, custom needs, small scale | Reliable data at scale without maintenance |
For most people who just want the data, a SERP API (services that return parsed Google results as JSON) is the pragmatic choice. It hides the proxy and CAPTCHA machinery and, crucially, keeps its parsers updated so a Google markup change is its problem, not yours. Roll your own only if you need control the APIs do not offer, or your volume makes them uneconomical — and you have the engineering to maintain it.
A minimal example (and its limits)
Here is the shape of a basic DIY approach in Python — enough to see the moving parts:
import requests, random, time
from bs4 import BeautifulSoup
proxies_pool = ["http://user:pass@ip1:port", "http://user:pass@ip2:port"]
def google_search(query, page=0):
params = {"q": query, "hl": "en", "gl": "us", "start": page * 10}
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ..."}
proxy = {"https": random.choice(proxies_pool)}
r = requests.get("https://www.google.com/search",
params=params, headers=headers, proxies=proxy, timeout=20)
if "unusual traffic" in r.text.lower():
raise RuntimeError("blocked — back off and rotate")
soup = BeautifulSoup(r.text, "lxml")
results = []
for h in soup.select("a:has(h3)"): # anchor on structure, not class names
title = h.select_one("h3").get_text(strip=True)
results.append({"title": title, "url": h.get("href")})
return results
time.sleep(random.uniform(2, 6)) # be gentle between requests
This works until it does not — the selector will drift, the residential proxies matter more than the code, and CAPTCHAs will eventually interrupt you. Which is exactly why the maintenance burden, not the initial script, is the real story of Google scraping.
FAQ
Is scraping Google legal? It violates Google's Terms of Service. Scraping publicly visible data is not automatically illegal in many jurisdictions, but ToS and laws vary — get advice before scraping at scale, and never collect personal data without a lawful basis.
Why do I keep getting CAPTCHAs? Your requests look automated: too fast, too many from one IP, datacenter proxies, or thin headers. Slow down, switch to residential proxies, randomize delays, and rotate IPs and cookies together.
Does &num=100 still return 100 results?
No — Google curtailed that parameter in 2025. Paginate with the start parameter (10 results per page) instead.
Should I build a Google scraper or use an API? If you mainly want reliable data, use a SERP API — it handles proxies, CAPTCHAs, and constant markup changes. Build your own only for control or scale reasons, with the engineering to maintain it.
Takeaways
A dependable Google scraper is 20% parsing and 80% not getting blocked. Generate query URLs in bulk, paginate with start (the num=100 shortcut is gone), lean on quality residential proxies with intelligent rotation, pace yourself, geo-target correctly, and anchor your parser on stable structure while monitoring for breakage. When the maintenance outweighs the benefit — which for many teams it does — reach for a SERP API and let someone else fight the arms race.
If you would rather receive clean, structured Google SERP data on a schedule without running any of this, scraping.pro offers it as a data-as-a-service feed.