# Google Search Results Scraper — Organic (`aiscraperdev/google-search-results-scraper`) Actor

Scrape Google SERPs by keyword or URL. Extract organic results, paid ads, AI Mode answers, People Also Ask, related queries & product ads. No API key needed.

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

## Pricing

from $3.50 / 1,000 results

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/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

## Google Search Results Scraper — Organic, Paid, AI Mode & People Also Ask

Extract structured data from Google Search results pages (SERPs) by keyword or URL. This Google SERP scraper API returns organic results, paid ads, AI Mode summaries, People Also Ask, related queries, and product ads — no API key or Google account required.

---

### What This Actor Does

The Google Search Results Scraper crawls Google Search Results Pages (SERPs) and extracts every data block on the page. Input a list of search terms or raw Google URLs and get back clean, structured JSON you can export to CSV, Excel, or feed into your pipeline.

**Supported data blocks:**

| Block | Description |
|---|---|
| 🌱 Organic results | Title, URL, description, position, emphasized keywords, site links |
| 🛍 Paid results | Ad copy, display URL, ad position |
| 🤖 AI Mode / AI Overview | Full AI-generated answer text + cited sources |
| ❓ People Also Ask | Question + answer + source URL |
| 🔍 Related queries | Suggested search terms + Google search URLs |
| 📢 Product ads | Product title, price, rating, review count, image URL |
| ⭐ Review ratings | Star rating and review count where present |

---

### Use Cases

- **SEO monitoring** — track your site's rank for target keywords over time
- **Competitor analysis** — monitor which pages rank above yours and why
- **Keyword research** — collect related queries and PAA questions at scale
- **Ad intelligence** — capture competitor paid ads copy and positioning
- **AEO / GEO tracking** — monitor AI Overview and AI Mode summaries for brand visibility
- **Content gap analysis** — identify what topics dominate the top 10 for your niche
- **Lead generation** — build URL lists from keyword searches for downstream scraping

---

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `queries` | array | `["hotels in Seattle"]` | Search terms or full Google URLs, one per line |
| `countryCode` | string | `us` | Google domain country (e.g. `us`, `gb`, `de`) |
| `languageCode` | string | `en` | Language of search results |
| `maxPagesPerQuery` | integer | `1` | Pages to scrape per query (1–10, ~10 results each) |
| `resultsPerPage` | integer | `10` | Results per page: 10, 20, 50, or 100 |
| `mobileResults` | boolean | `false` | Return mobile SERP results instead of desktop |
| `includeUnfilteredResults` | boolean | `false` | Include omitted/filtered results |
| `saveHtml` | boolean | `false` | Save raw HTML of each SERP page to key-value store |

#### Scraping by search term

```json
{
  "queries": ["latest crm tool", "best project management software"],
  "countryCode": "us",
  "languageCode": "en",
  "maxPagesPerQuery": 2,
  "resultsPerPage": 10,
  "mobileResults": false
}
````

#### Scraping by URL

Replace search terms with full Google URLs:

```json
{
  "queries": [
    "https://www.google.com/search?q=hotels+in+Seattle",
    "https://www.google.co.uk/search?q=best+crm+software"
  ]
}
```

> **Tip:** To get ~100 results per query, set `maxPagesPerQuery` to `10`. The actor navigates 10 pages collecting ~10 results each.

***

### Output

One dataset record per SERP page. Here is a sample record:

```json
{
  "searchQuery": {
    "term": "latest crm tool",
    "device": "DESKTOP",
    "page": 1,
    "type": "SEARCH",
    "domain": "google.com",
    "countryCode": "US",
    "languageCode": "en",
    "url": "https://www.google.com/search?q=latest+crm+tool&num=10&gl=us&hl=en&start=0"
  },
  "organicResults": [
    {
      "position": 1,
      "title": "Best CRM Software: User Reviews from May 2026",
      "url": "https://www.g2.com/categories/crm",
      "displayedUrl": "https://www.g2.com › Sales Tools",
      "description": "G2's top-rated CRM systems include Salesforce Sales Cloud, HubSpot Sales Hub, ActiveCampaign, ClickUp, and Close.",
      "date": "Apr 20, 2026",
      "emphasizedKeywords": ["Salesforce Sales Cloud"],
      "siteLinks": [],
      "type": "organic"
    }
  ],
  "paidResults": [],
  "paidProducts": [],
  "relatedQueries": [
    {
      "title": "best crm for small business",
      "url": "https://www.google.com/search?q=best+crm+for+small+business"
    }
  ],
  "peopleAlsoAsk": [
    {
      "question": "What is the most popular CRM tool?",
      "answer": "Salesforce is the most widely used CRM globally...",
      "url": "https://www.salesforce.com/..."
    }
  ],
  "aiModeResult": {
    "text": "The leading CRM tools in 2026 include Salesforce, HubSpot, Zoho CRM, and Pipedrive...",
    "sources": [
      {
        "title": "Best CRM Software 2026",
        "url": "https://www.g2.com/categories/crm",
        "description": "G2's top-rated CRM systems..."
      }
    ]
  },
  "resultsTotal": null
}
```

#### Get one result per row

Select the **Organic results** or **Paid results** export view in the Apify Console to spread each result into a separate row. Via API, append `&view=organic_results` or `&view=paid_results` to your dataset URL.

***

### Export Formats

- **JSON** — full nested structure, ideal for pipelines and APIs
- **CSV / Excel** — flat organic or paid results view, one row per result
- **HTML** — rendered SERP snapshot saved to key-value store (enable `saveHtml`)

Export via the Apify Console, Python SDK, Node.js SDK, API endpoint, or webhook.

***

### Pricing

This actor uses **Pay Per Event (PPE)** pricing — you pay only for what you extract.

| Event | Price |
|---|---|
| Per organic result | $0.003 |
| Per paid result | $0.003 |
| Actor start | included |

**Example:** Scraping 10 keywords × 1 page × 10 results = 100 results = **$0.30**

***

### How to Use

#### In the Apify Console

1. Go to the actor page and click **Try for free**
2. Enter your search terms under **Queries**, one per line
3. Set your country, language, and page depth
4. Click **Start** — results appear in the **Output** tab

#### Via API (Node.js)

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('YOUR_ACTOR_ID').call({
  queries: ['best crm software', 'salesforce alternatives'],
  countryCode: 'us',
  maxPagesPerQuery: 3,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Via API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("YOUR_ACTOR_ID").call(run_input={
    "queries": ["best crm software", "salesforce alternatives"],
    "countryCode": "us",
    "maxPagesPerQuery": 3,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

***

### Notes & Limitations

- Results vary by IP location, browsing history, and browser fingerprint. The actor uses rotating proxies to mitigate this.
- Google's SERP structure changes frequently. If a data block stops appearing, open an issue — updates are released promptly.
- `resultsTotal` is returned as `null` — Google no longer reliably exposes the total result count in HTML.
- AI Mode and AI Overview availability depends on query type and Google's rollout. Not all queries trigger these blocks.
- For very high-volume scraping (100k+ results/day), contact us to discuss a custom plan.

***

### Frequently Asked Questions

**Do I need a Google API key?**
No. This actor scrapes the public Google Search HTML — no API key or Google account required.

**How do I scrape Google in a specific country?**
Set `countryCode` to the two-letter country code (e.g. `gb` for UK, `de` for Germany). The actor routes requests through proxies in that country and uses the matching Google domain.

**Can I scrape Google Images or Google News?**
This actor is focused on the main web search SERP. For Images or News results, use a dedicated actor or pass a raw URL with the `tbm=isch` or `tbm=nws` parameter — basic fields will still be extracted.

**How do I get 100 results per keyword?**
Set `maxPagesPerQuery` to `10` and `resultsPerPage` to `10`. The actor will crawl pages 1–10, collecting ~10 results each.

**Is the output compatible with Google's own Search API?**
The field structure mirrors common SERP API conventions. Fields like `position`, `title`, `url`, `description`, and `displayedUrl` map directly to their equivalents in most SEO tools.

***

### Related Actors

- **Google Maps Scraper** — extract business listings, reviews, and contact info
- **Google Shopping Scraper** — product prices, ratings, and merchant data
- **Bing Search Scraper** — same workflow for Bing SERPs
- **Perplexity AI Search Scraper** — AI-native search results for AEO tracking

***

### Support

Found a bug or need a custom field? Open an issue on the actor page or email support. Typical response within 24 hours.

# Actor input Schema

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

List of search terms or full Google search URLs to scrape.

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

Two-letter country code for search origin (e.g., US, UK).

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

Two-letter language code (e.g., en, es).

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

Number of pagination results pages to scrape per query.

## `resultsPerPage` (type: `string`):

Number of search results to display per page.

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

Simulate a mobile device for SERP generation.

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

Save raw HTML of the SERP into the Key-Value store.

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

Append filter=0 to URL to disable Google's duplicate filtering.

## Actor input object example

```json
{
  "queries": [
    "hotels in Seattle"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "maxPagesPerQuery": 1,
  "resultsPerPage": "10",
  "mobileResults": false,
  "saveHtml": false,
  "includeUnfilteredResults": false
}
```

# Actor output Schema

## `results` (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": [
        "hotels in Seattle"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aiscraperdev/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": ["hotels in Seattle"] }

# Run the Actor and wait for it to finish
run = client.actor("aiscraperdev/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": [
    "hotels in Seattle"
  ]
}' |
apify call aiscraperdev/google-search-results-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Search Results Scraper — Organic",
        "description": "Scrape Google SERPs by keyword or URL. Extract organic results, paid ads, AI Mode answers, People Also Ask, related queries & product ads. No API key needed.",
        "version": "0.0",
        "x-build-id": "T4C0y9vZhLHbb9xx7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/aiscraperdev~google-search-results-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-aiscraperdev-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/aiscraperdev~google-search-results-scraper/runs": {
            "post": {
                "operationId": "runs-sync-aiscraperdev-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/aiscraperdev~google-search-results-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-aiscraperdev-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 or URLs",
                        "type": "array",
                        "description": "List of search terms or full Google search URLs to scrape.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "countryCode": {
                        "title": "Country Code (gl)",
                        "type": "string",
                        "description": "Two-letter country code for search origin (e.g., US, UK).",
                        "default": "us"
                    },
                    "languageCode": {
                        "title": "Language Code (hl)",
                        "type": "string",
                        "description": "Two-letter language code (e.g., en, es).",
                        "default": "en"
                    },
                    "maxPagesPerQuery": {
                        "title": "Max Pages per Query",
                        "maximum": 10,
                        "type": "integer",
                        "description": "Number of pagination results pages to scrape per query.",
                        "default": 1
                    },
                    "resultsPerPage": {
                        "title": "Results per Page (num)",
                        "enum": [
                            "10",
                            "20",
                            "50",
                            "100"
                        ],
                        "type": "string",
                        "description": "Number of search results to display per page.",
                        "default": "10"
                    },
                    "mobileResults": {
                        "title": "Mobile Results",
                        "type": "boolean",
                        "description": "Simulate a mobile device for SERP generation.",
                        "default": false
                    },
                    "saveHtml": {
                        "title": "Save HTML",
                        "type": "boolean",
                        "description": "Save raw HTML of the SERP into the Key-Value store.",
                        "default": false
                    },
                    "includeUnfilteredResults": {
                        "title": "Include Unfiltered Results",
                        "type": "boolean",
                        "description": "Append filter=0 to URL to disable Google's duplicate filtering.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
