# Google SERP Scraper - AI Overview & People Also Ask (`scrapercompany/google-search-scraper`) Actor

Scrape Google search results pages: organic results (position, title, link, snippet), the AI Overview with its cited sources, People also ask and related searches, for any query, country, language or city. Paging up to 10 pages. No proxies needed.

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

## Pricing

from $8.00 / 1,000 results 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 SERP Scraper - AI Overview & People Also Ask

**Google SERP Scraper** renders a Google results page for your query and returns it as structured data: **organic results** with position, title, URL, displayed URL and snippet, Google's **AI Overview with its cited sources**, **People also ask** questions and **related searches**. Target any country and language, or a specific city for local results. Use it for rank tracking, AI Overview visibility checks, SEO audits and content research. Pricing is pay-per-event: **$0.008 per results page**; failed requests are not charged.

Proxies, retries and anti-bot handling are built in, so you don't need your own proxies or an API key. Start a run, get structured JSON.

### What can this scraper do?

- **Organic results** with position, title, link, displayed URL and snippet.
- **People also ask**, **related searches** and the **AI overview** with sources.
- **Country, language and city-level** targeting (Google `gl`, `hl`, `location`/`uule`).
- Up to 20 results per page and **10 pages** per query.
- Optional **redirect resolution** to the final destination URL.
- Empty result pages are not charged.

### What data can you extract?

| Field | Description |
| --- | --- |
| `organic_results[].position / title / link / snippet` | Ranked organic results. `link` is the destination URL (Resolve redirect links, on by default) or Google's redirect when that option is off |
| `organic_results[].display_url` | URL as shown by Google |
| `people_also_ask` | Questions from the People also ask box |
| `related_searches` | Related queries |
| `ai_overview / ai_overview_sources` | AI overview text and the pages it cites |
| `total` | Organic results on the page |
| `search_parameters` | Query, page and market used |

Every dataset item also carries `input` (the exact request that was sent), `request_id` (quote it to support), `billed` and `scraped_at`.

### How to use Google SERP Scraper - AI Overview & People Also Ask

1. Open Google SERP Scraper - AI Overview & People Also Ask in Apify Console and go to the **Input** tab.
2. Enter one or more **search queries**, then pick a country and language (and optionally a city).
3. Adjust the options if needed. Dates accept an exact date (`2026-12-01`) or a relative one (`30 days` from today), so saved tasks and schedules never go stale.
4. Click **Start** and wait for the run to finish.
5. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or fetch them with the Apify API.

### Input example

This is the default input; running the Actor without changes uses it.

```json
{
  "queries": [
    "best time to visit japan"
  ],
  "maxPages": 1,
  "resolve": true,
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

### Output example

One dataset item per request (trimmed here; real items contain every field the API returns):

```json
{
  "endpoint": "/v1/google/search",
  "input": {
    "q": "best time to visit japan",
    "gl": "us",
    "hl": "en",
    "resolve": false
  },
  "ai_overview": "Spring: Cherry Blossoms (March – May)\nHighlights: Mild temperatures (45–70°F) and famous cherry blossoms (sakura) peaking in late March to early April.\nDrawb...",
  "ai_overview_sources": [],
  "meta": {
    "elapsed_s": 8.2,
    "rendered": true,
    "source": "google_search"
  },
  "organic_results": [
    {
      "display_url": "https://en.japantravel.com › Culture",
      "link": "https://www.google.com/goto?url=CAESeQHrOzAVJE8lGsYKYT",
      "position": 1,
      "snippet": "Mar 25, 2026 — If we're going by popular opinion, spring (March to May) is the best time to visit Japan…",
      "source": "Japan Travel",
      "title": "Best Time to Visit Japan: Seasons, Months, Weather & Events"
    },
    {
      "display_url": "https://www.japan-guide.com › travel-essentials",
      "link": "https://www.google.com/goto?url=CAESdAHrOzAVksx1otYJyS",
      "position": 2,
      "snippet": "The best time to visit Japan is in spring (March to May) for cherry blossoms, or autumn (October to November) for foliage…",
      "source": "japan-guide.com",
      "title": "The Best Time to Visit Japan"
    }
  ],
  "people_also_ask": [
    "Is $5000 enough for a week in Japan?",
    "What is the cheapest month to go to Japan?"
  ],
  "related_searches": [
    "Best time to visit Japan reddit",
    "Cheapest time to visit Japan"
  ],
  "search_parameters": {
    "engine": "google_search",
    "page": 1,
    "q": "best time to visit japan"
  },
  "total": 2,
  "request_id": "req_3f9c0d6e2b8a4c1f9e7d5b3a1c0e8f6d",
  "billed": true,
  "scraped_at": "2026-10-01T14:03:27.512Z"
}
```

A request that fails is saved with an `error` message instead (turn off **Include failed requests** to skip those). Failed requests are never charged.

### How much does it cost?

This Actor uses **pay-per-event** pricing: you pay for successful API requests, not for compute time.

| Event | Charged when | Price | Per 1,000 |
| --- | --- | --- | --- |
| `serp-page` | One rendered Google search results page (organic results, People also ask, related searches, AI overview). Empty pages are free. | $0.008 | $8.00 |

For example, 1,000 requests in the default mode cost **$8.00**.

- Failed requests (errors, invalid input, blocked upstream after retries) are **free**.
- Requests where the source returns nothing at all (no results, nothing priced) are saved but **not charged**.
- Set **Maximum cost per run** when you start a run and the Actor stops cleanly before going over it.

### FAQ

#### Do I need proxies or an API key?

No. Proxy rotation, retries and anti-bot handling are built in, and the Actor is ready to run as is. You only pay the per-event prices above.

#### Can I track rankings for a city?

Yes. Set **City-level location** to Google's canonical name, such as `Austin,Texas,United States`, and the results are localised to that city.

#### How many results can I get per query?

Up to 20 per page and up to 10 pages. Each page is one charged event; paging stops when a page is empty.

#### Is this the Google Custom Search API?

No. Google's Custom Search JSON API searches a site or a set of sites you configure. This Actor returns the regular Google results page, including People also ask and the AI overview.

#### Can I run it on a schedule for rank tracking?

Yes. Save your queries as a task and add an Apify schedule (daily or weekly). Each run keeps the position of every result, so you can compare runs or send them to Google Sheets, Make, Zapier or n8n with Apify integrations.

#### Does every query have an AI overview?

No. Google shows an AI overview only for some queries and markets. When it does, the Actor returns the text and the pages it cites; otherwise the field is empty.

#### Is it legal to scrape this data?

The Actor collects publicly available information that anyone can see without logging in. You are responsible for how you use the results: respect the source site's terms, copyright and privacy law (such as GDPR) and do not collect personal data without a lawful basis. If in doubt, ask a lawyer.

#### What happens when a request is blocked or rate-limited?

Rate limits (HTTP 429) and temporary errors (5xx) are retried automatically with exponential backoff, respecting `Retry-After`. If a request still fails it is saved with the error message and not charged, and the rest of the batch keeps going. A run only fails when every request failed.

#### Why did a request return an error?

Read the `error` field: validation problems (for example a malformed date or an unknown id) are reported exactly as the API sees them. Fix the input and run again; failed requests cost nothing.

#### How many requests can I run at once?

Any number per run. The Actor sends up to 3 requests in parallel by default (change it under **Run options**); larger batches simply take longer.

### Use it from your code

Call the Actor from any language through the [Apify API](https://docs.apify.com/api/v2). With the JavaScript client (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('scrapercompany/google-search-scraper').call({
    "queries": [
        "best time to visit japan"
    ]
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

With Python (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("scrapercompany/google-search-scraper").call(run_input={
    "queries": ["best time to visit japan"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

You can also schedule runs, chain them with webhooks, or connect them to Make, Zapier, n8n, Google Sheets and other integrations from the **Integrations** tab.

### Related scrapers

- [Google Autocomplete Scraper](https://apify.com/scrapercompany/google-autocomplete-scraper)
- [Google News Scraper](https://apify.com/scrapercompany/google-news-scraper)
- [Google Maps Scraper](https://apify.com/scrapercompany/google-maps-scraper)

### Support

Questions, a field you need, or a site that stopped working? Open an issue on the **Issues** tab. Include the `request_id` from the dataset item so we can trace the request.

# Changelog

This Actor's version history is a separate document: https://apify.com/scrapercompany/google-search-scraper/changelog.md

# Actor input Schema

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

One Google search per line. Operators such as <code>site:</code>, <code>intitle:</code> and quotes work.

## `gl` (type: `string`):

Google country (<code>gl</code>), e.g. <code>us</code>, <code>gb</code>, <code>de</code>. Results come from an exit in that country when possible.

## `hl` (type: `string`):

Interface language (<code>hl</code>), e.g. <code>en</code>, <code>fr</code>.

## `location` (type: `string`):

Google canonical place name for local results, e.g. <code>Austin,Texas,United States</code>.

## `num` (type: `integer`):

Organic results per page (1-20).

## `maxPages` (type: `integer`):

How many result pages to fetch for each query (1-10). Each page is a separate request and is charged separately; paging stops early when a page comes back empty.

## `page` (type: `integer`):

Result page to start from (1-10).

## `resolve` (type: `boolean`):

On by default: follows each result's Google redirect so <code>link</code> is the destination URL (a few seconds slower per page, same price). Turn off to get Google's redirect links faster.

## `uule` (type: `string`):

Raw Google <code>uule</code> location parameter, if you already encode your own. Overrides City-level location.

## `customRequests` (type: `array`):

Optional list of JSON objects, one request each, using the API field names shown above. Each object is merged over the options above, so you only need to give what differs. Example: <code>{"q":"pizza","gl":"us","location":"Austin,Texas,United States"}</code>

## `includeErrors` (type: `boolean`):

When on, a request that fails (for example an unknown property id) is saved as a dataset item with an <code>error</code> message so you can see what went wrong. Failed requests are never charged.

## `maxConcurrency` (type: `integer`):

How many API requests run at the same time (1-8). Parallel runs share one limit, so extra requests wait for a free slot instead of failing.

## `maxRetries` (type: `integer`):

Retries for rate limits (HTTP 429), temporary server errors (5xx) and network errors, with exponential backoff. Validation errors are never retried.

## Actor input object example

```json
{
  "queries": [
    "best time to visit japan"
  ],
  "gl": "us",
  "hl": "en",
  "num": 10,
  "maxPages": 1,
  "page": 1,
  "resolve": true,
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset item per request.

## `summary` (type: `string`):

Counts of succeeded, failed, skipped and charged requests.

# 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 time to visit japan"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapercompany/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 time to visit japan"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapercompany/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 time to visit japan"
  ]
}' |
apify call scrapercompany/google-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapercompany/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/WXzh2f6IyEMaGj0uh/builds/g11E0aF6uJhhUq34d/openapi.json
