Scrape Google Search results with Browserless
Extract titles, links, and other SERP data from Google Search pages with purpose-built APIs, stealth browsers, and residential proxies – without managing your own browser infrastructure.
Your complete Google Search scraping solution
Browserless gives you a choice between tools that all work with Google results pages, reduce bot detection, automate workflows, and scale data extraction.
Choose your Google Search scraper
Pick the method that matches the results you need – Google’s own HTML, scripted browser actions, or clean web-search data.
Part of our Predefined Scrapers API
Send a Google search URL to /scrapers/google/search. Receive the page HTML to parse organic results, ads, images, and other visible blocks. Optional JavaScript rendering handles AI Overviews if present. In beta for Cloud users.
Custom Google automation
Use Browser Automation Protocol (BAP), the typed Python/TypeScript layer on BrowserQL, for scripted navigation, selectors, stealth sessions, and proxy routing. Or use BrowserQL directly.
Structured search results
POST a query to /search to get JSON with titles, URLs, descriptions, and positions; optionally fetch result pages. It searches the web, rather than returning Google’s actual SERP. In beta for Cloud users.
Browserless features that make Google Search scraping reliable
Google changes its results layout and actively challenges automated traffic. Use the right tools for each part of your workflow.
What is a Google Search scraper?
What information can you use a Google Search scraper to collect?
A Google Search scraper retrieves information from public Google search results pages so you can analyze rankings, competitors, SERP features, and changes over time – without collecting each result manually.
Google Maps data, phone numbers, and full business profiles are separate extraction use cases. A Google Search page may surface some of those details, but they are not guaranteed in the results.
How Browserless overcomes the challenges of scraping Google Search
Choose the right Browserless feature for each web scraping problem rather than relying on a single scraping technique.
The challenge
Browserless’s solution
Bot detection and CAPTCHAs interrupt automated browsing
The Google Search Scraper API retries blocked searches and doesn’t charge for failures. For custom flows, run BAP or BrowserQL on the /stealth/bql route and add CAPTCHA solving. Neither guarantees access to every Google page.
Repeated requests can trigger IP-based restrictions
Built-in residential proxies support IP rotation and location options for browser-driven workflows.
Results depend on country, language, and location
Build Google search URLs with hl, gl, and optional uule parameters to request localized results.
AI Overviews and dynamic content may need JavaScript
Enable js_rendering in the dedicated Google scraper API to return rendered HTML when those modules appear.
Google changes its HTML, breaking extraction selectors
Retrieve HTML using the Google scraper API or extract targeted elements through BrowserQL. Test and update selectors when page structures change.
Large keyword batches create operational overhead
Browserless manages browser sessions. Queue requests and stay within your plan’s concurrency and usage limits.
SEO teams need reusable files, not raw HTML alone
Parse the Google response into JSON or CSV for Excel or Google Sheets. Use the separate /search API if structured web results are sufficient.
How Browserless scrapes Google Search
Build the search URL
Set your search query (q) and country/language (gl and hl). Add start to request a Google results page.
Send the request
POST the URL to /scrapers/google/search for Google HTML, or select BAP for a custom browser session.
Render and extract
Enable JavaScript rendering for AI Overviews, then parse the HTML for titles, ads, and other SERP elements. Resolve Google’s redirect links with /scrapers/google/goto to get destination URLs.
Export and scale
Save scraped data as JSON or CSV, import it into Google Sheets or Excel, and batch queries within usage limits.
A simple Google Search scraper code example
This Python example calls the Google Search Scraper API, extracts result titles, resolves each Google redirect link with /scrapers/google/goto, and exports the results to CSV. Install requests and beautifulsoup4 first.
Python
Google Search Scraper API to CSV
# pip install requests beautifulsoup4
import csv
import os
from urllib.parse import parse_qs, urlencode, urljoin, urlparse
import requests
from bs4 import BeautifulSoup
api_key = os.environ["BROWSERLESS_API_TOKEN"]
api_base = "https://production-sfo.browserless.io/scrapers/google"
google_url = "https://www.google.com/search?" + urlencode({
"q": "best laptop", "hl": "en", "gl": "us"
})
response = requests.post(
f"{api_base}/search",
params={"token": api_key},
json={"url": google_url},
timeout=150,
)
response.raise_for_status()
result = response.json()
if not result.get("ok"):
raise RuntimeError(str(result.get("error")))
def resolve(href):
url = urljoin("https://www.google.com", href)
if not urlparse(url).netloc.endswith("google.com"):
return url
goto = requests.post(
f"{api_base}/goto",
params={"token": api_key},
json={"url": url},
timeout=60,
)
location = (goto.json().get("data") or {}).get("location") if goto.ok else None
if location:
return location
query = parse_qs(urlparse(url).query)
return (query.get("url") or query.get("q") or [None])[0]
soup = BeautifulSoup(result["data"]["html"], "html.parser")
results = []
seen = set()
for h3 in soup.select("a[href] h3"):
title = h3.get_text(" ", strip=True)
url = resolve(h3.find_parent("a", href=True)["href"])
if not url or urlparse(url).scheme not in ("http", "https"):
continue
if title and url not in seen:
results.append({"title": title, "url": url})
seen.add(url)
with open("google-results.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=["title", "url"])
writer.writeheader()
writer.writerows(results)
print(f"Exported {len(results)} links to google-results.csv")Google may change its HTML, so review the output and adjust selectors before production. Each search costs 4 units and each resolved link 1 unit. The sample extracts result headings and links only, not ads, AI Overviews, or other SERP features.
Automate Google Search with the MCP
Connect Browserless to an MCP-compatible AI agent, then ask it to run searches without building your own browser automation. The steps follow the Browserless Google Search example.
Send your agent: “Go to https://github.com/browserless/browserless-mcp/blob/main/install.md and follow the instructions to install the Browserless MCP server for my client.” You can also connect to the hosted endpoint at https://mcp.browserless.io/mcp.
Prompt: “Use the browserless_search tool to search the web for ‘best laptop’ and return the top results, including the title and link.”
The browserless_search tool provides structured web-search results, not Google’s actual page HTML. Use /scrapers/google/search for a Google-specific SERP, including ads or AI Overviews when present.
Frequently asked questions
Ready to scrape Google Search with Browserless?
Start with the Google scraper API, automate custom workflows with BAP, or connect an AI agent through MCP.