# Google SERP Scraper - Search Results, Rankings & SERP Features (`alizarin_refrigerator-owner/google-serp-scraper`) Actor

Scrape Google search results: organic listings with real URLs and positions, local pack, featured snippets and People Also Ask questions. Perfect for SEO research, rank tracking, and competitive analysis.
Track Rankings
Analyze SERP Features
Research Competition
Study User Intent
Monitor Local SEO

- **URL**: https://apify.com/alizarin_refrigerator-owner/google-serp-scraper.md
- **Developed by:** [The Howlers](https://apify.com/alizarin_refrigerator-owner) (community)
- **Categories:** SEO tools, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 94 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 search queries

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 - Search Results, Rankings & SERP Features

Scrape Google search results: organic listings with their real URLs and positions, the local pack (map listings with ratings and review counts), featured snippets, People Also Ask questions, related searches and emphasized keywords. Multi-page pagination and CAPTCHA retries. Pages are fetched over plain HTTP through Apify's Google SERP proxy, with no browser.

On local searches (for example "plumber Austin TX") Google hides the link of every organic result behind an encrypted redirect. The actor unlocks each one by following Google's redirect, so you still get the real URL in its real position. Most links unlock with one short request; some take a few hops through Google's loading page or a retry on another proxy exit.

**Not extracted:** paid text ads, shopping ads, the Knowledge Panel, sitelinks and People Also Ask answers. Those output fields are always empty.

***

### Quick Start

#### Run with real data

```json
{
  "queries": [
    "best pizza near me"
  ],
  "location": "United States",
  "language": "en",
  "device": "desktop",
  "maxResults": 10,
  "maxPagesPerQuery": 1,
  "includePAA": true,
  "includeLocalPack": true,
  "includeFeaturedSnippet": true,
  "includeRelatedSearches": true,
  "includeEmphasizedKeywords": true,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  }
}
```

***

### Input Parameters

| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `queries` | array | `["best pizza near me"]` | No | List of search queries to scrape (one per line or comma-separated) |
| `location` | string | `"United States"` | No | Geographic location for localized results (e.g., 'New York, NY, USA') |
| `language` | string | `"en"` | No | Search language code |
| `device` | string | `"desktop"` | No | Label saved with each result. The same result page is fetched for both values |
| `maxResults` | integer | `10` | No | Number of organic results to extract per page (Google typically shows 10) |
| `maxPagesPerQuery` | integer | `1` | No | Number of Google result pages to scrape per query (1-10). Page 2 = results 11-20, etc. |
| `includeAds` | boolean | `false` | No | Not extracted: `ads` is always an empty list |
| `includeShoppingAds` | boolean | `false` | No | Not extracted: `shoppingResults` is always an empty list |
| `includePAA` | boolean | `true` | No | Extract People Also Ask questions (questions only) |
| `expandPAAAnswers` | boolean | `true` | No | Not extracted: answers need a browser, so only the questions are returned |
| `includeLocalPack` | boolean | `true` | No | Extract local business results (map pack) with ratings, reviews, categories |
| `includeFeaturedSnippet` | boolean | `true` | No | Extract featured snippet content (paragraph, list, or table type) |
| `includeKnowledgePanel` | boolean | `true` | No | Not extracted: `knowledgePanel` is never returned |
| `includeRelatedSearches` | boolean | `true` | No | Extract related search suggestions at bottom of SERP |
| `includeSitelinks` | boolean | `true` | No | Not extracted: `sitelinks` is always an empty list |
| `includeEmphasizedKeywords` | boolean | `true` | No | Extract bolded/emphasized words from result descriptions, showing the exact keyword matches Google uses |
| `maxRetries` | integer | `3` | No | Maximum retry attempts per request when CAPTCHA or errors occur (1-5) |
| `proxyConfiguration` | object | `{"useApifyProxy":true,"apifyProxyGroups":["GOOGLE_SERP"]}` | No | Proxy settings. GOOGLE_SERP group recommended for best results |
| `webhookUrl` | string | - | No | Optional webhook URL to receive results in real-time as each query completes |

***

### Output

Each dataset item is one result page for one query: its organic results, and the local pack (the map listings) when Google shows one.

#### Local pack fields

| Field | Example | Notes |
|-------|---------|-------|
| `name` | `Reliant Plumbing` | Business name |
| `rating` | `4.7` | Star rating. Read the same way whether Google prints 4.7 or 4,7. `null` when Google shows no rating |
| `reviewCount` | `2935` | Review count as a number. See below |
| `reviewCountText` | `2.9K` | The count exactly as Google printed it in the pack |
| `reviewCountExact` | `true` | `false` when `reviewCount` is an expanded abbreviation (2.9K read as 2900) |
| `category` | `Plumber` | Business category |
| `address` | `Austin, TX` | The location line Google shows: a street address, or the city for service-area businesses |
| `phone` | `(512) 222-6029` | When Google shows it |
| `sponsored` | `false` | `true` for a paid listing in the pack |

**How review counts are read.** In the pack Google shortens large counts, and the short form depends on the search language: 2.9K in English, 2,9 k in French, 2,9 mil in Portuguese, 2,9 tys. in Polish, 2.7万 in Japanese and Chinese, 2,9 B in Turkish (B means thousand there). The actor reads all of them in the language you searched in. The same result page also carries each listed business's exact count; when that count agrees with the short form, `reviewCount` is the exact number (2935) and `reviewCountExact` is `true`. When it does not (paid listings usually have no exact count), `reviewCount` is the short form expanded (2900) and `reviewCountExact` is `false`. A business Google shows with "No reviews" gets `reviewCount` 0.

#### Organic result fields

| Field | Example | Notes |
|-------|---------|-------|
| `position` | `3` | The result's real position on the page (page 2 starts after page 1's results) |
| `title` | `THE BEST 10 PLUMBING IN AUSTIN, TX` | |
| `url` | `https://www.yelp.com/search?cflt=plumbing&find_loc=Austin%2C+TX` | The real URL. `null` only when `linkStatus` is `locked` |
| `linkStatus` | `unlocked` | `direct`: a plain link on the page. `unlocked`: Google hid the link behind an encrypted redirect and the actor followed it. `locked`: the redirect could not be followed, so `url` is `null` and the result carries a `_notice` |
| `displayedUrl` | `https://www.yelp.com › Home Services › Plumbing` | The site line Google prints under the title |
| `description` | | The snippet |
| `emphasizedKeywords` | `["plumbers"]` | Bold words in the snippet |
| `sitelinks` | `[]` | Not extracted, always empty |

When Google shows review stars under a result (for example a Yelp or directory page), the result also has `rating`, `reviewCount`, `reviewCountText` and `reviewCountExact`, read the same way as in the local pack.

**Hidden links on local searches.** For searches with local intent, Google now replaces each organic result's link with an encrypted `google.com/goto` redirect. The actor follows each one through Apify's residential proxy and puts the real URL in `url`. Usually that is one short request that returns only the address the redirect points to. Sometimes Google first serves a loading page that points to a fresh redirect, so a link can take a few hops, and a request that fails is retried on another proxy exit. Nothing is downloaded from the result's own site. A result whose redirect still cannot be followed stays in its real position with `url: null` and `linkStatus: "locked"`; it is never dropped or renumbered. Each page item has `hiddenLinks` (`hidden`, `unlocked`, `locked`) so you can see how many were unlocked. When several links from one result page are followed, Google makes each further request wait a few seconds, so a local result page takes about 10 to 25 seconds longer than before. Up to three result pages are processed at the same time, so those waits overlap on runs with several queries. Unlocking is included in the Search Query price.

#### Page fields

`query`, `page`, `location`, `language`, `device`, `totalResults` (Google's text) and `totalResultsCount` (the same as a number, or `null` when Google shows no result count, which is common on current result pages), `peopleAlsoAsk` (questions only), `relatedSearches`, `featuredSnippet`, `hiddenLinks`, `scrapedAt`. `ads` and `shoppingResults` are always empty lists and `knowledgePanel` is never returned.

***

### Pricing

This actor uses **pay-per-event** billing:

| Event | When it is charged | Price |
|-------|--------------------|-------|
| Search Query | Per Google result page scraped: one per query at the default of 1 page per query (Pages Per Query 3 makes 3). Unlocking hidden result links is included. Failed pages and demo runs are not charged | $0.005 |

***

### Troubleshooting

#### "API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

#### No results or empty dataset

Check the run log for error messages. Common causes:

- Invalid input format (check the examples above)
- The target data doesn't exist or is too small to track

#### How do I test without an API key?

Run the actor with the default sample input, or set demoMode to true, and it returns labeled sample search result data showing the exact live output format. Every sample item carries demo: true and a \_notice field, and sample runs charge no task events. Add your own search queries to run a real scrape.

***

**Built by John Rippy | [Actor Arsenal](https://actorarsenal.com)**

# Actor input Schema

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

List of search queries to scrape (one per line or comma-separated)

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

Geographic location for localized results (e.g., 'New York, NY, USA')

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

Search language code

## `device` (type: `string`):

Label saved with each result. The same result page is fetched for both values.

## `maxResults` (type: `integer`):

Number of organic results to extract per page (Google typically shows 10)

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

Number of Google result pages to scrape per query (1-10). Page 2 = results 11-20, etc.

## `includeAds` (type: `boolean`):

Not extracted: ads is always an empty list.

## `includeShoppingAds` (type: `boolean`):

Not extracted: shoppingResults is always an empty list.

## `includePAA` (type: `boolean`):

Extract People Also Ask questions (questions only).

## `expandPAAAnswers` (type: `boolean`):

Not extracted: PAA answers need a browser, so only the questions are returned.

## `includeLocalPack` (type: `boolean`):

Extract local business results (map pack) with ratings, reviews, categories

## `includeFeaturedSnippet` (type: `boolean`):

Extract featured snippet content (paragraph, list, or table type)

## `includeKnowledgePanel` (type: `boolean`):

Not extracted: the Knowledge Panel is never returned.

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

Extract related search suggestions at bottom of SERP

## `includeSitelinks` (type: `boolean`):

Not extracted: sitelinks is always an empty list.

## `includeEmphasizedKeywords` (type: `boolean`):

Extract bolded/emphasized words from result descriptions, showing the exact keyword matches Google uses

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

Maximum retry attempts per request when CAPTCHA or errors occur (1-5)

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

Apify Proxy is enabled by default and required in practice. The actor fetches SERP HTML through the dedicated GOOGLE_SERP proxy group, which avoids the CAPTCHAs that Google serves to browser traffic.

## `demoMode` (type: `boolean`):

Return labeled sample data (demo: true) in the real output format without scraping. Free, no proxy usage, no task events charged.

## `webhookUrl` (type: `string`):

Optional webhook URL to receive results in real-time as each query completes

## Actor input object example

```json
{
  "queries": [
    "best pizza near me"
  ],
  "location": "United States",
  "language": "en",
  "device": "desktop",
  "maxResults": 10,
  "maxPagesPerQuery": 1,
  "includeAds": false,
  "includeShoppingAds": false,
  "includePAA": true,
  "expandPAAAnswers": true,
  "includeLocalPack": true,
  "includeFeaturedSnippet": true,
  "includeKnowledgePanel": true,
  "includeRelatedSearches": true,
  "includeSitelinks": true,
  "includeEmphasizedKeywords": true,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  },
  "demoMode": true
}
```

# Actor output Schema

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

One item per result page: organic results with real URLs and positions, local pack with ratings and review counts, featured snippet, People Also Ask questions, related searches, emphasized keywords and CAPTCHA detection

# 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 = {
    "demoMode": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("alizarin_refrigerator-owner/google-serp-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 = { "demoMode": True }

# Run the Actor and wait for it to finish
run = client.actor("alizarin_refrigerator-owner/google-serp-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 '{
  "demoMode": true
}' |
apify call alizarin_refrigerator-owner/google-serp-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alizarin_refrigerator-owner/google-serp-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/ZV78SjMh8wMiijiE0/builds/MFjZMipn07P2wgPeA/openapi.json
