# Google SERP & SEO Scraper (`googleapi/google-serp-seo-scraper`) Actor

Extract public Google Search organic results, paid cards, People Also Ask questions, AI Overview text, and visible result totals.

- **URL**: https://apify.com/googleapi/google-serp-seo-scraper.md
- **Developed by:** [Google API](https://apify.com/googleapi) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 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.

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

Collect a structured record of what Google Search publicly displays for each keyword. A record can contain organic and sponsored results, product cards, People Also Ask questions, AI Overview content, video and discussion cards, and related searches when those modules appear.

This Actor describes the visible search results. It does not access Google Ads or Search Console accounts, crawl result destinations, estimate search volume or backlinks, or provide historical rank tracking.

### How to use

1. Enter a keyword or several queries, or provide public Google Search URLs.
2. Choose the language, country, result count, and page range.
3. Select which result modules to include.
4. Run the Actor and review one dataset record per keyword.

Example:

```json
{
  "query": "mechanical keyboards",
  "language": "en",
  "country": "US",
  "maxResults": 20,
  "maxPages": 2,
  "includePaid": true,
  "includeProducts": true,
  "includePaa": true,
  "includeAiOverview": true
}
```

### Input

| Input | Description | Default |
|---|---|---:|
| `query` / `queries` | One or more search phrases. `keywords` and `searchQuery` are aliases. Queries can set their own language, country, and result limit. | — |
| `startUrls` | Public Google Search URLs with a `q` parameter. When provided, these take precedence over generated queries. `urls` is an alias. | — |
| `language` / `country` | Google Search language and country code. | `en` / `US` |
| `maxResults` | Maximum organic results per keyword across pages (1–100). | 10 |
| `maxItems` | Maximum keyword records across the run (1–20). | 10 |
| `page` / `maxPages` | First Google results page and maximum consecutive pages per keyword. | 1 / 10 |
| `includePaid` | Include visible sponsored text ads. | `true` |
| `includeProducts` | Include Sponsored Products, Popular products, and More products modules. | `true` |
| `includePaa` | Include visible People Also Ask cards. | `true` |
| `includePaaAnswers` | Expand a bounded number of question cards to collect answers. | `false` |
| `maxPaaExpansions` | Maximum question cards to expand. | 5 |
| `includeAiOverview` | Include a visible AI Overview and cited sources. | `true` |
| `includeSnippets` | Include visible text excerpts under result cards. | `true` |
| `renderJavaScript` | Use a standard browser for rendered Google Search content. | `true` |
| `proxyConfiguration` | Optional proxy settings for page requests. | — |

### Output

Each dataset item represents a keyword and its visible Google Search page. The record can include:

- **Keyword summary:** language, country, displayed total-results text, and fields describing the first organic result.
- **Search cards:** organic results, sponsored listings, and product cards with visible prices, sellers, ratings, and delivery details.
- **Answer content:** People Also Ask, AI Overview, and featured snippets with visible text and citations.
- **Discovery modules:** related searches, People Also Search For, search tabs, videos, discussions, and result refinements.

Modules vary by query, language, location, and time. Dates and prices are preserved as Google displays them; missing values are not guessed. Result links are included for reference but their destinations are not opened.

Example dataset item:

```json
{
  "keyword": "mechanical keyboards",
  "language": "en",
  "country": "US",
  "totalResultsText": "About 2,100 results",
  "organicResults": [
    {
      "title": "A sample mechanical keyboard guide",
      "resultUrl": "https://example.org/keyboards",
      "domain": "example.org",
      "descriptionSnippet": "A public result excerpt shown by Google.",
      "resultType": "web"
    }
  ],
  "relatedSearches": [
    {
      "term": "quiet mechanical keyboard",
      "destinationUrl": "https://www.google.com/search?q=quiet+mechanical+keyboard"
    }
  ],
  "peopleAlsoAsk": [
    {
      "question": "Which keyboard is best for typing?"
    }
  ]
}
```

The Output tab shows the available result fields. Run summary information is available with the run output in Apify.

### Limits and responsible use

Google controls which modules appear and may change or limit results by query, locale, and time. More queries, pages, and optional answer expansion increase run time. The Actor does not sign in or bypass access checks.

Use public search information responsibly and follow applicable privacy requirements and Google Search terms. This Actor is not affiliated with Google.

# Actor input Schema

## `query` (type: `string`):

One public Google Search phrase. Used when no query list or start URL is supplied.

## `searchQuery` (type: `string`):

Compatibility alias for one public search phrase.

## `keywords` (type: `array`):

Compatibility list of public search phrases.

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

Search phrases with optional language, country, and per-keyword total organic-result cap.

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

Public HTTPS Google /search URLs containing a q parameter. Existing Google parameters are retained; page and result-limit controls are applied consistently.

## `urls` (type: `array`):

Compatibility list of public Google Search /search URLs.

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

Two-letter language code, optionally followed by a region.

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

Two-letter Google country code.

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

Maximum organic results combined from Google’s ten-result pages for each keyword.

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

Global cap on keyword records emitted across all supplied keywords and URLs.

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

One-based Google results page to start from; page 2 uses Google’s observed start=10 offset.

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

Maximum consecutive ten-result pages to inspect for each keyword, starting at the selected page.

## `includePaid` (type: `boolean`):

Include visible sponsored cards when Google displays them.

## `includeProducts` (type: `boolean`):

Include visible Sponsored Products, Popular products, and More products cards with their shown prices, sellers, delivery, ratings, and review links.

## `includePaa` (type: `boolean`):

Include the visible question cards and any answer text already rendered on the page.

## `includePaaAnswers` (type: `boolean`):

Use a standard browser to expand a bounded number of public question cards. Disabled by default; requires JavaScript rendering.

## `maxPaaExpansions` (type: `integer`):

Maximum People Also Ask cards opened when answer expansion is enabled.

## `includeAiOverview` (type: `boolean`):

Include the visible AI Overview introduction, sections, bullets, and cited public sources when present.

## `includeSnippets` (type: `boolean`):

Include the text excerpts Google visibly shows under result cards.

## `timeoutSecs` (type: `integer`):

Bounded timeout for each public Google Search page request.

## `requestDelayMs` (type: `integer`):

Pause between public result-page requests.

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

Finite retry count for transient request failures. Access boundaries are not retried or bypassed.

## `retries` (type: `integer`):

Compatibility alias for maxRetries.

## `renderJavaScript` (type: `boolean`):

Use an ordinary browser for public search pages when enabled. GOOGLE_SERP uses its documented static HTTP transport. Public disclosures are bounded; access boundaries stop collection.

## `browserWaitMs` (type: `integer`):

Bounded wait for public Google Search content after navigation.

## `browserScrolls` (type: `integer`):

Maximum ordinary page scrolls used to reveal lazy public result modules.

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

Configured proxies apply to HTTP and ordinary browser requests. GOOGLE_SERP uses its documented static HTTP transport and cannot expand browser-only answer panels.

## Actor input object example

```json
{
  "language": "en",
  "country": "US",
  "maxResults": 10,
  "maxItems": 10,
  "page": 1,
  "maxPages": 10,
  "includePaid": true,
  "includeProducts": true,
  "includePaa": true,
  "includePaaAnswers": false,
  "maxPaaExpansions": 5,
  "includeAiOverview": true,
  "includeSnippets": true,
  "timeoutSecs": 30,
  "requestDelayMs": 200,
  "maxRetries": 1,
  "renderJavaScript": true,
  "browserWaitMs": 2500,
  "browserScrolls": 1
}
```

# Actor output Schema

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

No description

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

No description

## `output` (type: `string`):

No description

## `health` (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 = {};

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

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

```

## MCP server setup

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