# Google Search Scraper (`rainminer/google-search-scraper`) Actor

Extract public Google Search organic and paid results for your keywords. Get rank, title, URL, snippet, and query metadata with country and language settings — no login. Export JSON or CSV and automate SERP monitoring through the Apify API.

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

## Pricing

from $1.40 / 1,000 scraped search result pages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![Google](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png)

### What does Google Search Scraper do?

**Google Search Scraper** extracts **public organic and paid results** from [Google Search](https://www.google.com/). Enter keywords or paste a Google SERP URL and export **rank, result type, title, URL, display URL, snippet, and query metadata** with **country** and **language** settings.

No Google account and no coding. Run it on the **Apify platform** to schedule crawls, export JSON, CSV, or Excel, and pull SERP data through the API.

### Why scrape Google Search results?

Google is the default discovery layer for SEO, paid search, and market research. Teams use SERP exports to track rankings, monitor competitors, and feed data pipelines.

- **SEO rank tracking** — Store positions for target keywords in a given country and language.
- **SERP feature research** — See which domains and snippets Google shows for a query.
- **Paid vs organic** — Capture top and bottom ads alongside organic links when ads appear.
- **Localization** — Set `gl` and `hl` to approximate regional Google results.
- **Competitive intelligence** — Compare who ranks for high-intent queries over time.
- **Lead gen research** — Find listing pages and landing URLs from live SERPs.
- **Automation** — Schedule runs and send datasets to webhooks, Sheets, or your warehouse.

### How to scrape Google Search

1. Open **Google Search Scraper** in Apify Console.
2. Add **Search queries** (one per line) **or** **Start URLs** from your browser’s address bar after searching on Google.
3. Set **Country code** and **Language code** for localized results.
4. Set **Maximum items** per query (start with 5 for a quick test).
5. Enable **Include paid results** if you need Google Ads blocks when they appear.
6. Turn on **Apify Proxy** if you see captchas or empty pages.
7. Run the Actor and download JSON, CSV, Excel, or HTML.

Example start URL: `https://www.google.com/search?q=apify+web+scraping&hl=en&gl=us`

### What data can you extract from Google Search?

| Field | Description |
| --- | --- |
| position | Rank in the run for that query or start URL |
| resultType | `organic` or `paid` |
| title | Result or ad title |
| url | Destination URL |
| displayUrl | Visible URL / breadcrumb when shown |
| snippet | Description text when shown |
| imageUrl | Thumbnail when Google shows one |
| query | Search query |
| page | SERP page number |
| searchUrl | URL that produced the row |
| countryCode | Country (`gl`) used for the run |
| languageCode | Language (`hl`) used for the run |

### How much does it cost to scrape Google Search?

Pricing is **pay per event**: each successfully scraped **results page**, plus an additional event per page when **paid ad extraction** is enabled. Browser compute and optional proxy usage are billed separately on Apify. Run a small test with the default maximum of 5 results before a large export.

### Input

**Search queries** or **Start URLs**, **Maximum items** (per query/URL), **Country code**, **Language code**, **Include paid results**, and optional **proxy configuration**. Proxy is **off by default**; enable Apify Proxy if Google blocks your IP.

`maxItems` applies **per query or start URL**. Two queries with a maximum of 20 can return up to 40 rows.

### Output

You can download the dataset in JSON, HTML, CSV, or Excel.

```json
{
  "id": "organic:https://apify.com/",
  "position": 1,
  "resultType": "organic",
  "title": "Apify: Full-stack web scraping and automation platform",
  "url": "https://apify.com/",
  "displayUrl": "apify.com",
  "snippet": "Apify is a platform for building and running web scrapers and automation workflows.",
  "imageUrl": null,
  "query": "apify web scraping",
  "page": 1,
  "searchUrl": "https://www.google.com/search?q=apify+web+scraping&hl=en&gl=us",
  "countryCode": "us",
  "languageCode": "en"
}
```

### FAQ

#### Do I need a Google account?

No. The Actor reads **public** search result pages only.

#### Why am I seeing a captcha or empty dataset?

Google rate-limits automated traffic. Enable **Apify Proxy** (residential often works best) and reduce concurrency by running fewer queries per run.

#### Does this scrape AI Overviews or AI Mode?

No. This Actor focuses on **classic organic and paid SERP links** shown on standard Google Search pages.

#### Can I use Google Search URLs from other domains?

Use `https://www.google.com/search?...` URLs or let the Actor build them from **Search queries**.

### Integrations

Connect Google Search Scraper to **Zapier**, **Make**, **Slack**, **Airplane**, **Google Sheets**, and thousands of other tools via Apify webhooks and API.

### Related Actors

- [Qwant Search Scraper](https://apify.com/rainminer/qwant-search-scraper?fpr=uuazcu)
- [Ecosia Search Scraper](https://apify.com/rainminer/ecosia-search-scraper?fpr=uuazcu)
- [Brave Search Scraper](https://apify.com/rainminer/brave-ai-mode-scraper?fpr=uuazcu)

### Image Credit

Image credit: [google.com](https://www.google.com/)

# Actor input Schema

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

One Google search query per line. Ignored when Start URLs are provided unless you also use queries.

## `startUrls` (type: `array`):

Full Google Search URLs (https://www.google.com/search?q=...). Optional if Search queries are set.

## `maxItems` (type: `integer`):

Maximum number of results (organic + paid) to return per query or start URL.

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

Two-letter country code for localized Google results (maps to gl=).

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

Interface and snippet language hint (maps to hl=).

## `includePaidResults` (type: `boolean`):

When enabled, extracts top and bottom Google Ads blocks when present.

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

Google often blocks bare datacenter and home IPs. For reliable SERP access, enable Apify Proxy (RESIDENTIAL group recommended).

## Actor input object example

```json
{
  "queries": "best coffee berlin\napify web scraping",
  "maxItems": 5,
  "countryCode": "us",
  "languageCode": "en",
  "includePaidResults": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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": `best coffee berlin
apify web scraping`,
    "countryCode": "us",
    "languageCode": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/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 coffee berlin
apify web scraping""",
    "countryCode": "us",
    "languageCode": "en",
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 coffee berlin\\napify web scraping",
  "countryCode": "us",
  "languageCode": "en"
}' |
apify call rainminer/google-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rainminer/google-search-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/EghZiFJEmhilh3AB0/builds/deDuvtZ4RSuaaP9hy/openapi.json
