Google SearchGuard: How Google's Anti-Bot System Works
SearchGuard is the anti-bot layer Google put in front of Search in January 2025. It runs an encrypted JavaScript virtual machine in the browser, scores how human the session looks, and blocks or challenges anything that looks automated.
On this page
- What is Google SearchGuard?
- SearchGuard timeline
- How SearchGuard checks a request
- What SearchGuard measures
- Encrypted tokens and script rotation
- Why headless browsers and SERP scrapers get caught
- Google v. SerpApi: the lawsuit that named SearchGuard
- What SearchGuard means for SEO tools and data teams
- SearchGuard FAQ
- Sources
What is Google SearchGuard?
SearchGuard is Google's name for the bot-detection system that protects Google Search. The name became public in Google's December 2025 lawsuit against SerpApi, where Google described it as a technological measure that blocks automated access to Search results.
Under the hood, SearchGuard is almost certainly BotGuard applied to Search. BotGuard is Google's in-house anti-bot system, known internally as Web Application Attestation (WAA). It dates to around 2013 and already protects YouTube, Google Maps and reCAPTCHA v3.
What makes it different from a classic CAPTCHA:
- It is invisible. Most users never see a puzzle. The check runs silently in the page.
- It needs JavaScript. A plain HTTP client that cannot execute the challenge script never produces a valid token.
- It scores behavior, not just identity. Mouse movement, typing rhythm, scrolling and timing all feed the verdict, alongside a browser fingerprint.
- It hides its logic in a virtual machine. The detection code is compiled to encrypted bytecode that runs inside an obfuscated JavaScript interpreter.
SearchGuard timeline
| Date | Event |
|---|---|
| Aug 24, 2026 | SerpApi moves to dismiss the amended complaint; hearing set for Sep 29, 2026 |
| Aug 18, 2026 | Igor Kozlowski publishes a hands-on probe of the SearchGuard challenge and the signals its VM reads |
| Aug 10, 2026 | Google files an amended complaint built on licensed content (Reddit as the lead example) |
| Jul 20, 2026 | Court grants SerpApi's motion to dismiss Google's DMCA claims, with 21 days to amend |
| Jun 25, 2026 | A mandatory JavaScript "Verifying your request" gate starts rolling out on Search, per scraping vendors |
| Jan 2026 | Researchers decrypt BotGuard script version 41, the code behind SearchGuard |
| Dec 19, 2025 | Google sues SerpApi under DMCA Section 1201 for circumventing SearchGuard |
| Oct 22, 2025 | Reddit sues SerpApi, Oxylabs, AWMProxy and Perplexity, citing SearchGuard as the control they bypassed |
| Sep 2025 | Google removes the num=100 parameter, so tools need about 10x more requests per keyword |
| Jan 2025 | SearchGuard goes live on Google Search and breaks most SERP scrapers overnight |
How SearchGuard checks a request
The check starts before any JavaScript runs and ends with a short-lived token the server can verify. Here is the flow for a fresh visitor with no cookies or history, based on public reverse-engineering work:
- Headers and Client Hints. Chrome sends
sec-ch-ua-platform,sec-ch-ua-arch,sec-ch-ua-mobile, plusx-browser-channelandx-browser-validation. The last one is a 20-byte value that appears to be derived from a key built into Chrome and the User-Agent, so a spoofed User-Agent will not match it. - Challenge page. Instead of results, Google returns an HTML page with a script that must run. It carries a session identifier (
sei) generated from the initial request. - Marker cookies. The server sets HttpOnly cookies that tie later requests back to the same client.
- The VM runs. A roughly 61,000-character obfuscated script boots a bytecode virtual machine. The bytecode is encrypted, the key is issued at runtime, and instruction numbers are reshuffled on every load.
- Client token. The VM writes a cookie named
SG_SSwith a 30-second lifetime. Its value changes on every attempt. No JavaScript means noSG_SS, and verification fails. - Verdict. A good token lets the results through. A bad or missing one leads to the "Verifying your request" interstitial, a reCAPTCHA, or a block.
The VM also defends itself. If it detects tampering, it can switch to a fallback branch that collects different data. In Kozlowski's tests, a run that detected interference produced an 871-character output, while a clean run produced about 1,660 characters.
What SearchGuard measures
SearchGuard combines three kinds of evidence: how you move, what your browser looks like, and whether automation tooling has left traces.
Behavioral signals
The VM listens passively to mouse, keyboard, touch, scroll, focus and visibility events. It keeps running statistics with Welford's online variance algorithm and keeps 50 sample events per metric through reservoir sampling. The core idea is simple: human timing is noisy and roughly Gaussian, while bot timing is uniform or perfectly regular.
| Signal | What it tracks | Human range (estimated) | Flagged as bot (estimated) |
|---|---|---|---|
| Mouse | Trajectory, velocity, acceleration, jitter | Velocity variance 50–500 | Velocity variance below 10 |
| Keyboard | Inter-key gaps, key hold time, pauses, typos | Hold-time variance 20–50 ms | Hold-time variance under 5 ms |
| Clicks | Interval between clicks | Variance 100–1,000 ms | Variance under 20 ms |
| Scroll | Amplitude, direction changes, smoothness | Delta variance 20–100 px | Delta variance under 5 px |
| Event rate | Events per second | 10–50 per second | Over 200 per second |
The thresholds come from static analysis of decrypted code and are estimates, not values Google has confirmed.
Environment fingerprint
- Navigator:
userAgent,languages,platform,hardwareConcurrency,deviceMemory,maxTouchPoints,connection - Screen and window: width, height,
colorDepth,pixelDepth,devicePixelRatio, document dimensions, history length - Timing:
performance.now()precision,timeOrigin, timer jitter - Visibility:
document.hidden,visibilityState,hasFocus() - DOM: around 100 HTML tag types monitored, with
BUTTONandINPUTweighted most
Automation markers
The VM probes for leftovers from common frameworks: navigator.webdriver, ChromeDriver's $cdc_ and $wdc_ prefixes, Puppeteer's $chrome_asyncScriptInfo, Selenium's __selenium_unwrapped, PhantomJS (_phantom, callPhantom), Nightmare, Cypress, CefSharp and others. It also checks for window.chrome.runtime, which is missing in headless Chrome. In one probe, 32 of the 72 distinct names it touched did not exist in a normal browser: the VM was looking for things only automation tools add.
Encrypted tokens and script rotation
Everything the VM collects leaves the browser as an encrypted token, and the code that builds it changes every few minutes.
- Token pipeline: serialize the data, compress it, prepend a 4-byte random IV, encrypt it, then encode it as base64url. The output starts with
!. - Cipher: an ARX (add-rotate-XOR) block cipher that resembles Speck, the lightweight cipher the NSA published in 2013. Reported parameters: 64-bit block, 64-bit key, 15 rounds.
- Rotating constant: a magic constant inside the cipher changed from 1426 to 3328 in about 20 minutes of observation.
- Delivery: the script loads from
//www.google.com/js/bg/{HASH}.js. A new hash busts the cache and pushes new parameters to every client.
The practical effect is that a hard-coded token generator or a patched copy of the script can go stale within minutes of a rotation.
Why headless browsers and SERP scrapers get caught
Most scrapers fail SearchGuard on more than one layer at once, so fixing a single signal rarely helps.
- No JavaScript, no token. Plain HTTP clients (requests, curl, most SERP libraries) never run the VM, so they never produce
SG_SS. - Headers that don't add up. A spoofed User-Agent will not match
x-browser-validationor the Client Hints Chrome sends. Kozlowski advises against User-Agent spoofing for this reason. - Framework leftovers. Playwright triggered the challenge immediately in Kozlowski's test, even though the script contains no readable
navigator.webdriverstring. The checks are hidden inside the encrypted bytecode. - Robotic behavior. Scripted mouse paths, fixed typing delays and instant scrolling produce near-zero variance, which is exactly what the statistics look for.
- Volume. Hundreds of near-identical queries from one IP range stand out no matter how good each session looks.
A quiet failure mode catches many teams. The "Verifying your request" page can come back as HTTP 200 with valid HTML and no results. A scraper that only checks status codes will log it as a success and store empty data. Check the response body for the challenge markup, not just the status.
The engineering cost also went up. With JavaScript rendering required and num=100 gone, each keyword now needs a real browser session and up to 10 requests where one used to do.
Google v. SerpApi: the lawsuit that named SearchGuard
Google's first attempt to treat SearchGuard as a copyright lock failed, and a narrower second attempt is still pending.
The claim. On December 19, 2025, Google sued Texas-based SerpApi in the Northern District of California (case 4:25-cv-10826-YGR). Google did not sue for breach of its terms of service. It used DMCA Section 1201, the anti-circumvention rule that makes it illegal to break technical locks on copyrighted works. Google said SerpApi sent hundreds of millions of automated queries a day, bypassed SearchGuard (including by solving CAPTCHAs automatically), and resold the results. It described SearchGuard as the product of tens of thousands of person-hours and millions of dollars, and asked for statutory damages of $200 to $2,500 per act of circumvention.
The context. Search Engine Land reported that SerpApi had listed OpenAI as a customer until 2024, and that Google had turned down OpenAI's request for index access that year. The complaint does not name OpenAI.
The defense. SerpApi moved to dismiss on February 20, 2026. Its argument: SearchGuard is a traffic-control tool for Google's domain, not a lock on copyrighted works, and it treats copyrighted and non-copyrighted content the same way. Its lawyers summed this up by saying the system is called SearchGuard, not CopyrightGuard.
The ruling. On July 20, 2026, Chief Judge Yvonne Gonzalez Rogers granted the motion. The court accepted that Google had alleged enough to infer SerpApi circumvented SearchGuard. But it found SearchGuard's job is to regulate automated access, and Google had not shown that the owners of copyrighted works in the results authorized it to control access to them. Claims over ordinary search results were dismissed for good. Google got 21 days to try again on licensed content only, and discovery was paused.
The second round. Google filed an amended complaint on August 10, 2026. It now ties SearchGuard to content licensed into Search, such as music lyrics, merchant product images and Reddit posts, and quotes Reddit's own filing saying it authorized partners like Google to protect that content. SerpApi moved to dismiss again on August 24, arguing Google never produced or quoted the licenses it relies on. A hearing was set for September 29, 2026. Check the docket for the latest status.
The parallel case. Reddit's October 2025 suit against SerpApi, Oxylabs, AWMProxy and Perplexity raises similar questions and also cites SearchGuard.
What SearchGuard means for SEO tools and data teams
SERP data is now more expensive to collect, and the legal question around it is unsettled.
- Higher cost per keyword. Rank trackers, keyword tools and AI-visibility trackers that rely on scraped SERPs pay for browser rendering, better IPs and roughly 10x more requests since
num=100went away. - More fragility. Script rotation every few minutes means anything built on a reverse-engineered token can break without warning. Expect more "successful" requests that return challenge pages.
- Supply-chain risk. Many SEO platforms buy SERP data from a small number of API vendors. If a court eventually accepts Google's DMCA theory for licensed content, those vendors, and their customers' data, are exposed.
- The July ruling is a signal, not settled law. It came from one district court at the motion-to-dismiss stage. It does not make scraping Google legal in general, and the licensed-content theory is still alive.
- Publishers have a separate problem. Google-Extended does not cover AI Overviews. Blocking Googlebot to opt out also removes you from Search traffic.
For teams that depend on SERP data, the safest moves are to know where your data comes from, watch the SerpApi docket, and build monitoring that catches empty or challenge responses before they reach reports.
This article is not legal advice.
SearchGuard FAQ
Is SearchGuard the same as reCAPTCHA? No. reCAPTCHA v3 is one of the products built on BotGuard. SearchGuard is BotGuard deployed on Google Search. A reCAPTCHA can still appear as a fallback when SearchGuard is unsure.
When did Google launch SearchGuard? January 2025, according to Google's own complaint against SerpApi.
What is the SG_SS cookie? A cookie the SearchGuard script creates in the browser. It lives for about 30 seconds and changes on every attempt. Without it, the request fails verification.
Why do I see "Verifying your request" on Google? Google's systems flagged the session as possibly automated. Common causes are VPNs, shared or datacenter IPs, browser extensions, or very fast repeated searches. Waiting, switching networks or signing in usually clears it.
Can SearchGuard detect Puppeteer, Playwright or Selenium? Yes. It checks for markers these tools leave, such as navigator.webdriver, ChromeDriver's $cdc_ variables and missing window.chrome.runtime, and it scores interaction patterns that scripted sessions rarely get right.
Is scraping Google Search illegal? There is no simple answer. Google's terms prohibit automated access. In July 2026 a federal court dismissed Google's DMCA claims over ordinary search results, but a narrower claim about licensed content was still pending as of this writing.
Sources
- Google SearchGuard anti-bot system — Igor Kozlowski, Aug 18, 2026
- Inside SearchGuard: How Google detects bots and what the SerpAPI lawsuit reveals — Search Engine Land
- BotGuard Analysis, version 41 — Resoneo, Jan 2026
- Google Verifying Your Request: What It Means and How to Fix It — cloro (a SERP API vendor)
- Google v. SerpApi: The Court Granted Our Motion to Dismiss — SerpApi, Jul 21, 2026
- Google loses key DMCA claims against SerpApi — Search Engine Land
- Google loses DMCA bid to treat search scraping like DVD piracy — PPC Land
- SerpApi faces revived Google scraping claims built on Reddit licensing terms — PPC Land
- SerpApi asks judge to end Google's scraping case over three unseen contracts — PPC Land
- Google tried again: we're moving to dismiss a second time — SerpApi, Aug 25, 2026
- SerpApi's motion to dismiss (Feb 20, 2026) — CourtListener
- Google's amended complaint (Aug 10, 2026) — CourtListener