[Home](https://scrapfly.io/)/[Scrapers](https://scrapfly.io/scrapers)/Google Search

Search results · AI Mode · keyword data

# // Google Search Scraper API

Get Google search results, AI Mode answers and keyword data as clean JSON, through a proxy in the country you pick. Send a search URL with the Unblocker on, and read the results.

- **Clone it and run it.** An open-source Google scraper for search results, related searches, People also ask and AI Mode answers, tested against live Google every night.
- **Every result's rank, site and destination.** Each organic result comes with its position, title, the site name Google shows, its snippet and its date when Google shows one, and the scraper follows its `/goto` link to the destination URL.
 
 [Get free API key](https://scrapfly.io/register) [View GitHub scraper](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper) [Read Unblocker docs](https://scrapfly.io/docs/scrape-api/unblocker) 

1,000 free credits. No credit card required.

 [  ](https://scrapeway.com/web-scraping-api/scrapfly) [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 

 Google search · illustration

 

 

 Search results JSON**Output**

```
[
  {
    <span class="c-str">"position"</span>: <span class="c-num">2</span>,
    <span class="c-str">"origin"</span>: <span class="c-str">"Scrapfly"</span>,
    <span class="c-str">"domain"</span>: <span class="c-str">"scrapfly.io"</span>,
    <span class="c-str">"date"</span>: <span class="c-str">"Jul 2, 2025"</span>
  },
  {
    <span class="c-str">"position"</span>: <span class="c-num">6</span>,
    <span class="c-str">"origin"</span>: <span class="c-str">"Medium · Scrapfly"</span>,
    <span class="c-str">"domain"</span>: <span class="c-str">"medium.com"</span>,
    <span class="c-str">"date"</span>: <span class="c-key">null</span>
  }
]
```

Sample output of the open-source scraper[See the request ↓](#implementation)

  

What you can scrape from Google

Four kinds of Google search data you can scrape with Scrapfly, no Google API key required.

 

## // Scrape Google search results

Each organic result of a results page, with its position, title, link, the site name Google shows, the link's domain, its snippet and its date when Google shows one. The link is a `/goto` redirect: the scraper requests it once more to read the destination URL and its domain.

- position
- title
- url
- origin
- domain
- description
- date

  

## // Scrape every page of a Google search

The scraper fetches the pages of a search with `start=10`, `start=20` and so on, concurrently, up to `max_pages`, and numbers the results across pages. It reads a page only when it has Google's Search Results heading, and skips the others.

- max\_pages
- start
- position

  

## // Scrape Google AI Mode answers

Add `udm=50` to a search URL for AI Mode. The scraper renders the page, waits for its Good response button, and an extraction prompt returns the answer as plain text with the cards of its sources panel, each with a title, URL and snippet. The sample run for *best web scraping tools 2026* returned 14 sources.

- query
- answer
- sources
- captured\_at

  

## // Scrape related searches and People also ask

The related searches Google suggests for a query, those of three words or more, and its People also ask questions: keyword and FAQ ideas around a seed term. The sample run got 6 related searches for *web scraping emails*, such as "Email scraper free", and 4 questions, such as "How to scrape emails from the web?".

- scrape\_keywords
- related\_search
- people\_ask\_for

  



Reliability

## // Get the results page, not a reCAPTCHA

When a network seems to send automated traffic to Google Search, Google can answer with "Our systems have detected unusual traffic from your computer network", most likely with a reCAPTCHA, its Search Help says. The open-source scraper sends every Google request with the Unblocker on, from the US, renders its pages in a browser, and reads a results page only when it has Google's Search Results heading.

`unblocker=true`

Scrapfly's [Unblocker](https://scrapfly.io/products/unblocker) on every Google request, as in the scraper's settings. It handles CAPTCHA challenges and bot detection, and can switch the proxy pool or turn on a browser.



`render_js=true`

Every search, keyword and AI Mode page is rendered in a browser. Resolving a `/goto` link does without.



`country=US`

The scraper's proxy country. Set yours among 75+ countries: the country that served the request is in `context.proxy.country`.



 



Choose your tools

## // Scrapfly products for Google scraping

Start with the Web Scraping API and the Unblocker. Add the search results extraction model, screenshots or a browser session as your workflow needs them, or start from the open-source scraper. One API key covers all four products.

 

### Web Scraping API for Google search

Send a Google search URL with the Unblocker on, through a proxy in the country you choose, and get the results page back as HTML.

Read the organic results, related searches and People also ask from it, or add `udm=50` to the search URL for AI Mode.

```
GET /scrape?url=https://www.google.com/search?q=web+scraping+emails&unblocker=true&render_js=true&country=US
```

 [Explore Web Scraping API →](https://scrapfly.io/products/web-scraping-api)  

### Data Extraction API for Google results

Set `extraction_model` to `search_engine_results` to get the results page back as structured JSON, with no parser to write.

The schema has the query, each organic result's position, title, URL, snippet, display URL and date, the page's ads and related searches, the links to the next pages, and the AI Overview's summary and cited sources when the page shows one.

```
GET /scrape?url=https://www.google.com/search?q=web+scraping+emails&unblocker=true&render_js=true&country=US&extraction_model=search_engine_results
```

 [Explore Data Extraction API →](https://scrapfly.io/products/extraction-api)  

### Screenshot API for Google results pages

A full-page capture of the results page of a query.

Keep a dated visual record of the rankings next to your JSON.

```
GET /screenshot?url=https://www.google.com/search?q=web+scraping+emails&country=us&capture=fullpage&format=png
```

 [Explore Screenshot API →](https://scrapfly.io/products/screenshot-api)  

### Cloud Browser API for Google sessions

Call the Unblock API with a Google search URL: it opens the page in a hosted browser on a residential proxy, with the Unblocker's bypass done, and returns a `ws_url`.

Connect Playwright or Puppeteer to it, open the search with `goto()` and read the rendered results.

```
POST https://browser.scrapfly.io/unblock?key=KEY {"url": "https://www.google.com/search?q=web+scraping+emails", "country": "us"}
```

 [Explore Cloud Browser API →](https://scrapfly.io/products/cloud-browser-api)  

### Open-source Google scraper on GitHub

Clone the Python scraper for search results, related searches, People also ask and AI Mode answers.

It runs on the Web Scraping API with the Unblocker, resolves each result's destination URL, and is tested against live Google every night.

- scrape\_serp
- scrape\_keywords
- scrape\_ai\_mode

 [View the scraper on GitHub →](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper)  



One request

## // Fetch a Google results page and read its results

The JSON at the top is cut from `results/serp.json`, the sample output the open-source scraper's test saved for *scrapgly blog web scraping* (the test's spelling): results 2 and 6, four fields of each, with their `/goto` links resolved. This code is a cut-down version of the scraper's request and parser for one results page: Unblocker on, JavaScript rendering, from the US. Its links are still the `/goto` redirects, which the full scraper requests once more.

Install `scrapfly-sdk` and `parsel`, then replace the key below. Change the query to search your own terms.

**Prefer the full scraper?** The open-source [Google scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper) collects the results of several pages of a search with their destination URLs, related searches, People also ask and AI Mode answers, in Python 3.12. It runs against live Google every night. Clone it, set `SCRAPFLY_KEY`, and run `poetry run python run.py`. Its Google Maps functions have a page of their own: [Google Maps Scraper API](https://scrapfly.io/scrapers/google-maps).

 

  Python · scrapfly-sdkscrape + parse

```
<span class="c-key">import</span> json
<span class="c-key">from</span> urllib.parse <span class="c-key">import</span> quote, urljoin
<span class="c-key">from</span> scrapfly <span class="c-key">import</span> ScrapeConfig, ScrapflyClient

client = ScrapflyClient(key=<span class="c-str">"YOUR_SCRAPFLY_KEY"</span>)
query = <span class="c-str">"scrapfly blog web scraping"</span>
result = client.scrape(ScrapeConfig(
    <span class="c-str">f"https://www.google.com/search?hl=en&q={quote(query)}"</span>,
    unblocker=<span class="c-key">True</span>,  <span class="c-com"># previously asp</span>
    country=<span class="c-str">"US"</span>, render_js=<span class="c-key">True</span>,
))
serps = []
<span class="c-key">for</span> box <span class="c-key">in</span> result.selector.xpath(<span class="c-str">"//div[@id='search']/div/div/div"</span>):
    title = box.xpath(<span class="c-str">".//h3/text()"</span>).get()
    url = box.xpath(<span class="c-str">".//h3/../@href"</span>).get()
    <span class="c-key">if not</span> title <span class="c-key">or not</span> url:
        <span class="c-key">continue</span>
    serps.append({
        <span class="c-str">"position"</span>: len(serps) + <span class="c-num">1</span>,
        <span class="c-str">"title"</span>: title,
        <span class="c-str">"url"</span>: urljoin(<span class="c-str">"https://www.google.com"</span>, url),
        <span class="c-str">"origin"</span>: box.xpath(<span class="c-str">".//div[*[cite]]/div/span/text()"</span>).get(),
    })
print(json.dumps(serps, indent=<span class="c-num">2</span>, ensure_ascii=<span class="c-key">False</span>))
```

 

 



What the data is used for

## // Common Google scraping use cases

### Google rank tracking

Record where your pages and your competitors' pages rank for the queries you track.



### AI search visibility

Track which sources AI Mode cites for your queries, and the AI Overview the extraction model reads when a results page shows one.



### Country-by-country SERP checks

Run the same query from each country you sell in and compare the results.



### Keyword research

Expand a seed list with the related searches and People also ask questions of each term.



### Paid search monitoring

See which ads show for your keywords and what they say, from the extraction model's ads list.



### Search results for AI agents

Feed Google results to an agent or a RAG pipeline, now that the Custom Search JSON API is closed to new customers.



 



Common questions

## // Google scraping FAQ

 Is scraping Google legal?

There is no universal answer. Legality depends on your jurisdiction, the data, the access method and how you use the result. Keep the workflow to public results pages, stay signed out, review Google's terms of service, and get legal advice for commercial use.

 Does Google have a search API?

Not for new customers. Google's Custom Search JSON API returns the results of a Programmable Search Engine you create, and it is closed to new customers: existing customers have until January 1, 2027 to move to another solution. These requests read Google's public results pages, so you need a Scrapfly API key, not a Google API key.

 Why do Google result links point to google.com/goto?

Google no longer puts the destination URL in its results page: each organic result links to a `/goto?url=` redirect whose token cannot be decoded locally. The open-source scraper requests each link once more, without JavaScript rendering, and keeps the URL it lands on and its domain. The redirect is followed before the destination loads, so a destination that fails to load still gives its URL.

 How do I scrape Google AI Mode?

Add `udm=50` to a search URL and render the page with the Unblocker on, as the open-source scraper's `scrape_ai_mode` does. It waits for the page's Good response button, then an extraction prompt returns the query, the answer as plain text and the cards of its sources panel, each with a title, URL and snippet. Its sample run for *best web scraping tools 2026* returned 14 sources.

 Can I scrape Google results for another country?

Yes. Set `country` to the proxy country you want, among 75+ countries: the scraper searches from the US with `country=US`. Google estimates the general area of every search, from sources that include the IP address of the connection, to give relevant results. With the Unblocker on, the country you set is kept unless the website refuses visitors from it, and the country that served the request is in the response, under `context.proxy.country`.

 How do I get more than the first page of results?

Add `start=10` to the search URL for the second page and `start=20` for the third, as the scraper does for the `max_pages` pages it fetches concurrently: it reads `start` as the number of results before the page and numbers the results from there. A page without Google's Search Results heading is skipped.

 How much does scraping Google cost?

A Google results page fetched as the scraper fetches it, with the Unblocker and JavaScript rendering on the default datacenter proxies, costs 6 credits. The Unblocker can switch the request to residential proxies when the page needs them, for 30 credits, and the scrape log shows the pool and the cost. Each `/goto` link the scraper resolves is one more request, without rendering, from 1 credit. The AI Mode request's extraction prompt, like the search results extraction model, adds 5 credits, and 5 more for each 500 KB of page past the first 500 KB. The Free plan includes 1,000 credits a month.

 What are the rate limits when scraping Google?

Your maximum parallelism is the concurrency quota of your plan, from 5 requests at once on the Free plan to 100 on Enterprise, or a lower limit set on the project. Each request counts against it while it is in flight: the scraper sends the pages of a search, and then their `/goto` links, concurrently.

 



Start with one request

## Send the query. Read the results.

Web Scraping API with the Unblocker, one call per Google search URL.

Proxies across 75+ countries

 [Google scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper) [How to scrape Google search](https://scrapfly.io/blog/posts/how-to-scrape-google) [Google Maps Scraper API](https://scrapfly.io/scrapers/google-maps) [All scraper pages](https://scrapfly.io/scrapers) 

 

 [Get free API key](https://scrapfly.io/register) [Read the docs](https://scrapfly.io/docs/scrape-api/unblocker)