# Google Search Results Scraper (`mikolabs/google-search-results-scraper`) Actor

A high-performance, HTTP-based scraper that efficiently extracts structured data from Google Search Results (SERPs) at scale. It delivers fast, reliable, and accurate search data, making it ideal for SEO analysis, market research, competitor monitoring, and data collection.

- **URL**: https://apify.com/mikolabs/google-search-results-scraper.md
- **Developed by:** [mikolabs](https://apify.com/mikolabs) (community)
- **Categories:** Lead generation, SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

<div align="center">
    <img src="assest/cleanlogo.png" alt="Mikolabs Google Search Results Scraper Logo" height="150" />
</div>

## Google Search Results Scraper

**Google Search Results Scraper** crawls Google Search Engine Results Pages (SERPs) and extracts highly accurate structured data at lightning speeds. Built on a pure HTTP Python stack without browser overhead, this SERP scraper API is optimized for performance, scalability, and cost-efficiency.

With this powerful Google SERP API, you can:
- **Extract core Google data:** Get organic search results including title, URL, description snippet, and ranking position.
- **Find related queries:** Extract "Related Searches" to discover what else users are searching for to build topical authority.
- **Find People Also Ask (PAA):** Extract PAA questions directly from the SERP to uncover search intent and content gaps.
- **Export data in multiple formats:** Download your datasets in JSON, CSV, Excel, XML, or HTML.
- **Integrate easily:** Export via SDKs (Python & Node.js), API Endpoints, Webhooks, or integrate directly with your favorite workflows.

### What data can I extract with Google Search Results Scraper?
🌱 **Organic results**  
❓ **Related searches**  
🙋‍♀️ **People Also Ask**  

This scraper focuses specifically on delivering the most critical SEO metrics—organic rankings and related query suggestions—faster than any browser-based alternative.

![Google Search Results Scraper Input](assest/input.png)

### How can I use data scraped from Google Search?
Google SERP data is the backbone of digital marketing and competitive intelligence. With this scraper, you can:
- **Use it for SEO tracking:** Monitor how your website performs on Google for specific queries over time.
- **Perform Keyword Research:** Use People Also Ask and Related Searches to discover long-tail keywords and content ideas.
- **Monitor your competition:** See who is ranking on the first page for your target keywords.
- **Build URL lists:** Collect targeted URLs for specific keywords to use in secondary scraping or outreach campaigns.
- **Analyze Google's algorithm:** Track SERP volatility and identify the main trends in ranking fluctuations.

### How to use Google Search Results Scraper
Google Search Results Scraper is designed with users in mind, making it incredibly easy to use without writing a single line of code:
1. Create a free Apify account using your email.
2. Open **Google Search Results Scraper**.
3. Enter one or more search queries or keywords.
4. Set your desired country, language, and the number of results per query.
5. Click the "Start" button and wait for the lightning-fast HTTP extraction to complete.
6. Download your data in JSON, XML, CSV, Excel, or HTML.

### How much will scraping Google Search cost you?
This scraper uses a highly cost-effective **pay-per-event (PPE)** pricing model. You are not charged for Apify platform compute time—only a fixed price for specific events!
- **Start Fee:** $0.00005 per run
- **Dataset Item Fee:** $15.00 per 1,000 results

- **Cost-Effective:** Because it's an HTTP crawler, memory and CPU usage is minimal, saving you compute unit costs.
- **Lightweight Docker Image:** Built on a slim `apify/actor-python` base image rather than a bulky Playwright image, guaranteeing instant container startups and minimal overhead.

On the Apify Free plan, you get $5 worth of monthly credit, which lets you scrape thousands of Google Search results completely for free. Because it uses an HTTP stack, it consumes far fewer resources than browser-based scrapers.

---

### ⬇️ Input Configuration
The scraper lets you control exactly what kind of Google Search data you want to extract. 

You can specify the following settings:
- **Search Queries:** List of keywords to scrape.
- **Max Results per Query:** Determine how deep into the SERP you want to go (e.g., 10 results = 1 page, 50 results = 5 pages).
- **Country:** Two-letter country code (gl) to localize your search.
- **Language:** Language code (hl) for the Google interface.
- **Include People Also Ask:** Toggle extraction of PAA questions.
- **Include Related Searches:** Toggle extraction of related search suggestions.

#### Example Input (JSON)
```json
{
    "queries": [
        "mikolabs",
        "facesearch api"
    ],
    "maxResultsPerQuery": 10,
    "country": "us",
    "language": "en",
    "includePeopleAlsoAsk": true,
    "includeRelatedSearches": true,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["GOOGLE_SERP"]
    }
}
````

***

### ⬆️ Output Data

The scraper stores its results in the default dataset associated with the scraper run. You can export it to various formats, such as JSON, XML, CSV, or Excel.

For each extracted item, the dataset will contain a clean, structured record.

![Google Search Results Scraper Output](assest/output.png)

#### Example Output (JSON)

```json
[
  {
    "query": "best CRM for startups",
    "position": 1,
    "title": "The 10 Best CRM Software for Startups in 2026",
    "url": "https://www.hubspot.com/products/crm/best-crm-for-startups",
    "displayUrl": "www.hubspot.com › products › crm",
    "snippet": "Compare the top CRM platforms for startups by features, pricing, and ease of use.",
    "resultType": "organic",
    "scrapedAt": "2026-06-11T09:15:42.123Z"
  },
  {
    "query": "best CRM for startups",
    "position": 1,
    "title": "What is the best CRM for a small startup?",
    "url": "",
    "displayUrl": "",
    "snippet": "",
    "resultType": "people_also_ask",
    "scrapedAt": "2026-06-11T09:15:42.155Z"
  }
]
```

***

### Frequently Asked Questions (FAQ)

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

By design, this scraper outputs a clean, flat table format. Each organic result, PAA question, and related search is saved as a completely separate item (row) in the dataset. This means when you download the data as a CSV or Excel file, you instantly get a perfect table with exactly one result per row.

#### Can I use integrations with Google Search Results Scraper?

Absolutely! You can integrate Google Search Results Scraper with almost any cloud service or web app. Apify offers native integrations with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and more. Alternatively, you can use Webhooks to trigger actions whenever a scrape finishes.

#### Can I use Google Search Results Scraper with the Apify API?

Yes, the Apify API gives you programmatic access to manage, schedule, and run this Actor. To access the API using Node.js, use the `apify-client` NPM package. To access it using Python, use the `apify-client` PyPI package.

#### Is it legal to scrape Google Search data?

Web scraping is generally legal if you are extracting publicly available data, which applies to most data on Google Search. However, you should respect boundaries such as personal data and intellectual property regulations, and factor in Google's Terms of Use.

#### Support & Feedback

If you are not sure that the results are complete or if you encounter any unexpected behaviors, please create an issue on the Actor's **Issues** tab. We are constantly monitoring and improving the performance of our scrapers and highly value your feedback!

# Actor input Schema

## `queries` (type: `array`):

List of Google search queries to scrape (one per line). Supports Google operators: "exact phrase", site:domain.com, -exclude.

## `maxResultsPerQuery` (type: `integer`):

Maximum number of organic results to extract per query. Google shows 10 per page — values above 10 trigger pagination (e.g. 20 → 2 pages, 100 → 10 pages).

## `country` (type: `string`):

Two-letter country code for Google geolocation (gl parameter). Controls which Google data center serves results.

## `language` (type: `string`):

Language code for the Google interface (hl parameter). Controls the language of the SERP interface and result language preference.

## `includePeopleAlsoAsk` (type: `boolean`):

When enabled, extracts People Also Ask questions (and answers when Google includes them) as separate items with resultType: 'people\_also\_ask'.

## `includeRelatedSearches` (type: `boolean`):

When enabled, extracts related search suggestions from the bottom of the SERP as separate items with resultType: 'related\_search'.

## `proxy_configuration` (type: `object`):

Select proxies to be used. GOOGLE\_SERP proxies are strongly recommended to avoid blocks.

## Actor input object example

```json
{
  "queries": [
    "mikolabs",
    "facesearch api"
  ],
  "maxResultsPerQuery": 10,
  "country": "us",
  "language": "en",
  "includePeopleAlsoAsk": true,
  "includeRelatedSearches": true,
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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": [
        "mikolabs",
        "facesearch api"
    ],
    "proxy_configuration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "GOOGLE_SERP"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mikolabs/google-search-results-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": [
        "mikolabs",
        "facesearch api",
    ],
    "proxy_configuration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["GOOGLE_SERP"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("mikolabs/google-search-results-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": [
    "mikolabs",
    "facesearch api"
  ],
  "proxy_configuration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}' |
apify call mikolabs/google-search-results-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Search Results Scraper",
        "description": "A high-performance, HTTP-based scraper that efficiently extracts structured data from Google Search Results (SERPs) at scale. It delivers fast, reliable, and accurate search data, making it ideal for SEO analysis, market research, competitor monitoring, and data collection.",
        "version": "0.0",
        "x-build-id": "cnfbYRKz2igpsPWSq"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mikolabs~google-search-results-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mikolabs-google-search-results-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/mikolabs~google-search-results-scraper/runs": {
            "post": {
                "operationId": "runs-sync-mikolabs-google-search-results-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/mikolabs~google-search-results-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-mikolabs-google-search-results-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "List of Google search queries to scrape (one per line). Supports Google operators: \"exact phrase\", site:domain.com, -exclude.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerQuery": {
                        "title": "Max Results per Query",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of organic results to extract per query. Google shows 10 per page — values above 10 trigger pagination (e.g. 20 → 2 pages, 100 → 10 pages).",
                        "default": 10
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "us",
                            "gb",
                            "de",
                            "fr",
                            "in",
                            "jp",
                            "br",
                            "au",
                            "ca",
                            "es",
                            "it",
                            "nl",
                            "pl",
                            "ru",
                            "mx",
                            "ar",
                            "sg",
                            "za",
                            "ae",
                            "se"
                        ],
                        "type": "string",
                        "description": "Two-letter country code for Google geolocation (gl parameter). Controls which Google data center serves results.",
                        "default": "us"
                    },
                    "language": {
                        "title": "Language",
                        "enum": [
                            "en",
                            "de",
                            "fr",
                            "es",
                            "pt",
                            "it",
                            "nl",
                            "pl",
                            "ru",
                            "ja",
                            "zh",
                            "ko",
                            "ar",
                            "hi",
                            "sv",
                            "da",
                            "fi",
                            "no",
                            "cs",
                            "tr"
                        ],
                        "type": "string",
                        "description": "Language code for the Google interface (hl parameter). Controls the language of the SERP interface and result language preference.",
                        "default": "en"
                    },
                    "includePeopleAlsoAsk": {
                        "title": "Include People Also Ask",
                        "type": "boolean",
                        "description": "When enabled, extracts People Also Ask questions (and answers when Google includes them) as separate items with resultType: 'people_also_ask'.",
                        "default": true
                    },
                    "includeRelatedSearches": {
                        "title": "Include Related Searches",
                        "type": "boolean",
                        "description": "When enabled, extracts related search suggestions from the bottom of the SERP as separate items with resultType: 'related_search'.",
                        "default": true
                    },
                    "proxy_configuration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Select proxies to be used. GOOGLE_SERP proxies are strongly recommended to avoid blocks.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "GOOGLE_SERP"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
