# Google Search Results Scraper (`scrapeai/apify-google-search-scraper`) Actor

Scrape Google Search Engine Results Pages (SERPs). Select the country or language and extract organic and paid results, AI Mode, AI overviews, ads, queries, People Also Ask, prices, reviews, like a Google SERP API.

- **URL**: https://apify.com/scrapeai/apify-google-search-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Search Results Scraper

Scrape Google Search Engine Results Pages (SERPs). Select the country or language and extract organic and paid results, AI Mode, AI overviews, ads, queries, People Also Ask, prices, reviews, like a Google SERP API. Export data, run the scraper via API, schedule runs, or integrate with other tools.

### What is Google Search Results Scraper?

Google Search Results Scraper crawls Google Search Results Pages (SERPs) and extracts data from those web pages. With this SERP scraper API, you can:

- Extract almost any Google data from each Google page
- Data includes organic and paid results, as well as suggested results
- Scrape Google AI Mode, Perplexity AI search, ChatGPT search, Microsoft Copilot search, and Gemini search to improve AEO and GEO results
- Compare AI answers across platforms (Google, Perplexity, ChatGPT, Microsoft Copilot, Gemini) to spot narrative differences and search engine biases
- Also extract review ratings, review counts, and product ads
- Find related queries and People Also Ask answers
- Find prices for products or services
- Use business lead enrichment to further enrich your data with contact details (full name, work email address, phone number, job title, LinkedIn profile)
- Use Link prospecting tool to find pages cited by AI engines that don't mention your brand, with outreach contacts for link building
- Use SEO tools to scrape the full page content of organic results as markdown, for content gap analysis and SERP content benchmarking
- Export data in multiple formats: JSON, CSV, Excel, or HTML
- Export via SDKs (Python & Node.js), use API Endpoints, webhooks, or integrate with workflows

### What data can I extract with Google Search Results Scraper?

| Feature | Feature |
| --- | --- |
| 🌱 Organic results | 🛍 Paid results |
| 🤖 AI Mode + AI Overviews | 📢 Product ads |
| ❓ Related queries | 🙋‍♀️ People Also Ask |
| 🎯 Business leads enrichment | ⭐️ Review rating and review count |
| 🔗 Link prospecting tool | 🔍 SEO tools (website content) |
| 🪴 Suggested results | 🧩 Additional custom attributes |

#### 🤖 Add-on: Google AI Mode

Scrapes results from Google AI Mode - Google's dedicated AI-powered search interface on google.com, distinct from the standard AI Overviews snippets that appear in regular search results. AI Mode provides deeper, conversational answers with cited sources. Essential for Answer Engine Optimization (AEO) and Generative Engine Optimization (GEO) - track how your brand or content appears when users switch to Google's AI search experience.

#### ⏩ Add-on: AI Overview extraction

AI Overviews are extracted automatically when they appear in search results. Enable this add-on to use a specialized proxy that increases the probability of capturing AI Overviews - note this may take slightly longer than a standard run. Best used for queries where AI Overviews are likely to appear. An extra cost applies per query when an AI Overview is successfully captured.

#### 🧠 Add-on: Perplexity AI search

Enables you to fetch AI-generated answers using the Perplexity Sonar model. This feature is designed for cross-platform analysis, allowing you to directly compare other AI search model results against Perplexity's perspective to identify narrative differences and coverage gaps.

#### 💬 Add-on: ChatGPT search

Enables you to fetch AI-generated answers using OpenAI's search model. This feature is designed for cross-platform analysis, allowing you to directly compare other AI search model results against ChatGPT's perspective to identify narrative differences, coverage gaps, and search engine biases.

The output includes query fan-out under `queryFanOut`, showing additional search queries the model generated to answer your question.

#### ⏩ Add-on: Microsoft Copilot search

Enables you to fetch AI-generated answers using Microsoft Copilot. This feature is designed for cross-platform analysis, allowing you to directly compare other AI search model results against Microsoft Copilot's perspective to identify narrative differences, coverage gaps, and search engine biases.

You can choose from four modes to control how Microsoft Copilot structures its response: `chat` (conversational, quick answers), `reasoning` (deep analytical, multi-step logic), `smart` (balanced speed and reasoning), or `study` (detailed explanations for educational and research prompts).

#### ⏩ Add-on: Gemini search

Fetches AI-generated answers from Google Gemini (gemini.google.com) - Google's standalone AI assistant, separate from Google Search. Use this for cross-platform comparison to identify narrative differences and coverage gaps across AI platforms.

#### 🔗 Add-on: Link prospecting tool

Find websites that cover your topic but don't yet mention your brand - and get outreach contacts for link building.

To enable this add-on, enter your brand name in the Brand name field under the Add-on: Link prospecting tool section. For each query, the Actor collects all cited URLs from Google Search results and Google AI Overview (both automatic), plus any AI engines you have enabled separately (Google AI Mode, ChatGPT, Perplexity, Microsoft Copilot, and Gemini), and checks each page for brand mentions.

Results go to a separate Link prospecting tool dataset. Each item includes:

- Which source cited the page (Google Search, Google AI Overview, Google AI Mode, ChatGPT, Perplexity, Microsoft Copilot, or Gemini)
- The AI engine's response text (`aiResponseText`)
- Whether your brand is mentioned in the AI engine's response text (`isBrandMentionedInAiResponse`)
- Whether your brand is mentioned in the scraped page content (`isBrandMentionedInSource`)
- Business contacts for pages that do not mention your brand - up to 5 per domain, marketing and C-suite roles only

#### 🔍 Add-on: SEO tools

SEO-focused enrichments for organic search results, for content gap analysis, competitive audits, and SERP content benchmarking.

The first feature in this add-on is website content scraping. To enable it, turn on Enable website content scraping under the Add-on: SEO tools section. Each organic result's page is scraped with the Website Content Crawler, and its content is attached to the result as `websiteContent.text`, plus `websiteContent.markdown` when the page can be converted to markdown (`null` otherwise).

#### 📢 Add-on: Paid results (ads) extraction

Determines whether ads are present on the page and, if so, shows what they are. This is useful for anybody planning their own campaigns, or who want to know what competitors are showing.

#### 👥 Add-on: Business leads enrichment

This setting allows you to add contact information for companies and the employees working there, including full name, work email address, phone number, job title, and LinkedIn profile.

Under the 'Organic results' tab, you can now find multiple business leads associated with each individual search result.

#### ✅ Add-on: Email verification

When `verifyLeadsEnrichmentEmails` is enabled, each lead's email address is verified and an `emailVerification` object is added to the lead output. Requires business leads enrichment to be active.

### How can I use data scraped from Google Search?

- Use it for SEO and keep an eye on how your website performs on Google for certain queries over time
- Monitor how frequently a search term has been used on Google, and how it compares with total search volume
- Analyze display ads for a given set of keywords
- Monitor your competition in both organic and paid results
- Build a URL list for certain keywords for scraping web pages containing specific phrases
- Analyze the Google algorithm and identify its main trends
- Better lead generation with the business leads enrichment add-on
- Monitor AI overview summaries to see how a site performs
- Improved AEO, GEO, and brand visibility tracking with AI search add-ons
- Link prospecting tool - find unmentioned pages cited by AI engines and get outreach contacts
- SEO tools - scrape the full content of ranking pages as markdown for content gap analysis and SERP content benchmarking

### How to use Google Search Results Scraper

1. Create a free Apify account using your email
2. Open Google Search Results Scraper
3. Add one or more search queries or URLs
4. Click the "Start" button and wait for data to be extracted
5. Download your data in JSON, XML, CSV, Excel, or HTML

#### How to adapt your queries

To get a larger number of results, simply increase the number of pages you want to scrape (`maxPagesPerQuery`). For example, to get approximately 100 results, set `maxPagesPerQuery` to 10. The Actor will navigate through 10 pages for your query, collecting ~10 results from each.

### ⬇️ Input

The scraper lets you control what kind of Google Search data you can extract:

- Query phrases or raw Google search URLs
- Country/search domain
- Language of search
- Exact geolocation
- Number of results per page
- Mobile or desktop version results

Example input JSON:

```json
{
    "countryCode": "us",
    "customDataFunction": "async ({ input, $, request, response, html }) => {\n  return {\n    pageTitle: $('title').text(),\n  };\n};",
    "includeUnfilteredResults": false,
    "languageCode": "en",
    "maxPagesPerQuery": 2,
    "mobileResults": false,
    "queries": "hotels in Seattle \n hotels in New York",
    "saveHtml": false,
    "saveHtmlToKeyValueStore": false,
    "maxConcurrency": 10
}
```

Scrape Google Search results by URL:

```json
{
    "queries": "https://www.google.com/search?q=hotels+in+Seattle \n https://www.google.com/search?q=hotels+in+New+York"
}
```

### ⬆️ Output

The dataset contains structured SERP records. Example JSON output:

```json
[
    {
        "searchQuery": {
            "term": "Hotels in Seattle",
            "url": "http://www.google.com/search?q=Hotels+in+Seattle&num=5",
            "device": "DESKTOP",
            "page": 1,
            "type": "SEARCH",
            "domain": "google.com",
            "countryCode": "US",
            "languageCode": null,
            "locationUule": null
        },
        "resultsTotal": null,
        "relatedQueries": [
            {
                "title": "Airbnb",
                "url": "https://www.google.com/search?q=Airbnb"
            }
        ],
        "paidResults": [],
        "paidProducts": [],
        "organicResults": [
            {
                "title": "Downtown Seattle Hotel | Luxury Waterfront Hotel Rooms",
                "url": "https://www.edgewaterhotel.com/",
                "displayedUrl": "https://www.edgewaterhotel.com",
                "description": "The Edgewater Hotel is laden with a rich musical past and surrounded by breathtaking views of the Olympic Mountains, Elliott Bay and the sparkling city.",
                "emphasizedKeywords": ["The Edgewater Hotel"],
                "siteLinks": [],
                "productInfo": {},
                "type": "organic",
                "position": 1
            }
        ],
        "peopleAlsoAsk": [],
        "aiModeResult": {
            "engine": "AI Mode",
            "provider": "Google",
            "text": "You can find many hotel options in Seattle, from high-end downtown hotels to budget-friendly hostels.",
            "sources": [],
            "query": "Hotels in Seattle",
            "url": "http://www.google.com/search?q=Hotels+in+Seattle&num=5"
        }
    }
]
```

### Frequently Asked Questions

#### How to get one search result per row

Simply choose the Export view for Organic results and/or Paid results, it automatically spreads each result into a separate row. For API access, add `&view=paid_results` or `&view=organic_results` to the URL.

# Actor input Schema

## `queries` (type: `string`):

Use regular search words or enter Google Search URLs. You can also apply advanced Google search techniques, such as AI site:twitter.com or javascript OR python.

## `maxPagesPerQuery` (type: `integer`):

Maximum number of pages to scrape per search query. Each page contains approximately 10 results.

## `aiOverview` (type: `object`):

Enable extraction of AI Overview. Ensures the full AI Overview is extracted when one is present.

## `aiModeSearch` (type: `object`):

Scrapes results from Google AI Mode - Google's dedicated AI-powered search interface.

## `geminiSearch` (type: `object`):

Fetches an AI answer from Google Gemini.

## `perplexitySearch` (type: `object`):

Enable Perplexity to retrieve AI-generated answers using Sonar model.

## `chatGptSearch` (type: `object`):

Enable ChatGPT to retrieve AI-generated answers powered by OpenAI.

## `copilotSearch` (type: `object`):

Enable Microsoft Copilot to retrieve AI-generated answers.

## `maximumLeadsEnrichmentRecords` (type: `integer`):

Maximum number of lead records to scrape per domain found.

## `leadsEnrichmentDepartments` (type: `array`):

Filter to include only specific departments (e.g. marketing, sales).

## `verifyLeadsEnrichmentEmails` (type: `boolean`):

Verifies the email address of each lead extracted during business leads enrichment.

## `linkProspecting` (type: `object`):

Find websites that cover your topic but don't yet mention your brand.

## `websiteContentScraper` (type: `object`):

Scrapes each organic result page and attaches content to result item.

## `focusOnPaidAds` (type: `boolean`):

Enable extraction of paid results (Google Ads) with ad-specialized retries.

## `countryCode` (type: `string`):

Specifies the country used for search and Google Search domain (e.g. us, es, de, uk).

## `searchLanguage` (type: `string`):

Restricts search results to pages in a specific language (passed as lr URL parameter).

## `languageCode` (type: `string`):

Language of the Google Search interface (passed as hl URL parameter).

## `locationUule` (type: `string`):

The code for exact location for Google search (passed as uule URL parameter).

## `forceExactMatch` (type: `boolean`):

Searches for the exact phrase in query by wrapping in quotes.

## `site` (type: `string`):

Limits search to a specific site (e.g. site:example.com).

## `relatedToSite` (type: `string`):

Filters pages related to a specific site (e.g. related:example.com).

## `wordsInTitle` (type: `array`):

Filters pages with specific words in title using intitle: operator.

## `wordsInText` (type: `array`):

Filters pages with specific words in text using intext: operator.

## `wordsInUrl` (type: `array`):

Filters pages with specific words in URL using inurl: operator.

## `quickDateRange` (type: `string`):

Filters results from specific date range (e.g. d10, m6, y1).

## `beforeDate` (type: `string`):

Filters results from before specified date (e.g. 2024-12-31).

## `afterDate` (type: `string`):

Filters results from after specified date (e.g. 2024-01-01).

## `fileTypes` (type: `array`):

Filters results of specific file types using filetype: operator (e.g. pdf, doc).

## `mobileResults` (type: `boolean`):

Return results for mobile version of Google search.

## `includeUnfilteredResults` (type: `boolean`):

Include lower quality results normally filtered out.

## `saveHtml` (type: `boolean`):

Store HTML of search pages in dataset output.

## `saveHtmlToKeyValueStore` (type: `boolean`):

Store HTML of search pages in Key-Value store.

## `includeIcons` (type: `boolean`):

Include Base64-encoded icon image data if found.

## `proxyConfiguration` (type: `object`):

Proxy settings. Residential proxies recommended.

## Actor input object example

```json
{
  "queries": "best SEO tools apify web scraping",
  "maxPagesPerQuery": 1,
  "maximumLeadsEnrichmentRecords": 0,
  "verifyLeadsEnrichmentEmails": false,
  "focusOnPaidAds": false,
  "countryCode": "us",
  "searchLanguage": "en",
  "languageCode": "en",
  "forceExactMatch": false,
  "mobileResults": false,
  "includeUnfilteredResults": false,
  "saveHtml": false,
  "saveHtmlToKeyValueStore": true,
  "includeIcons": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": "best SEO tools apify web scraping"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/apify-google-search-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": "best SEO tools apify web scraping" }

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/apify-google-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": "best SEO tools apify web scraping"
}' |
apify call scrapeai/apify-google-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapeai/apify-google-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/3g17JRkah1Mq9rMGL/builds/lSeqgSCemmh2gI6iF/openapi.json
