# SERP API — Google Search, AI Overviews & Bulk Scraper (`sian.agency/google-serp-scraper`) Actor

Scrape Google SERPs at scale — organic results, AI Overviews, Knowledge Graph, Answer Box, videos & People Also Ask. Bulk up to 100 queries per call for rank tracking and keyword research. Clean JSON, pay per query.

- **URL**: https://apify.com/sian.agency/google-serp-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Business, AI, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 search results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## SERP API — Google Search, AI Overviews & Bulk Scraper 🔍

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Store-Trustpilot Reviews](https://img.shields.io/badge/Store-Trustpilot%20Reviews-00B67A)](https://apify.com/sian.agency/trustpilot-reviews-scraper?fpr=sian) [![Store-Smart Idealista](https://img.shields.io/badge/Store-Smart%20Idealista-E60023)](https://apify.com/sian.agency/smart-idealista-scraper?fpr=sian) [![Store-Instagram AI Transcript](https://img.shields.io/badge/Store-Instagram%20AI%20Transcript-E4405F)](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian)

#### 🎉 Scrape Google SERPs at scale — organic results, AI Overviews, Knowledge Graph & People Also Ask, plus bulk 100 queries in a single call
##### Built for SEO teams, rank trackers, GEO/AEO analysts, market researchers and AI/RAG engineers who need clean, structured Google search data on a schedule — no API key, no proxies, no browser farm

### 📋 Overview

**One actor, every part of the Google results page.** Most SERP scrapers on the Store return a flat list of organic links. Modern search is more than ten blue links — it's **AI Overviews**, Knowledge Graphs, answer boxes, "People Also Ask", top stories, videos and ads. This actor wraps a fast, reliable Real-Time Web Search backend and gives you all of it as clean JSON. Type a query, click Run, get structured rows back. No Google API key, no SerpAPI subscription, no proxy rotation.

It bundles **6 search modes** behind a single dropdown: **Google Search** (organic + AI Overviews flag), **Full SERP** (the whole page — Knowledge Graph, answer box, videos, PAA blocks, related searches), **Fast Light Search** (lowest latency), **Bulk Search** (up to **100 queries in one run**, charged per query), **AI Mode** (Google's generative answer), and **People Also Ask** (questions + full answers + source attribution). Pick one mode per run, get one tidy dataset out.

**Why SEO and data teams choose us:**
- ✅ **The whole SERP, not just links**: organic results, **AI Overviews**, Knowledge Graph, answer box, top stories, inline videos, ads, places and related searches — structured, in one run
- 📚 **Bulk 100 queries per call**: submit a whole keyword list in a single run, charged one credit per query — built for rank tracking and keyword-research sweeps
- 🤖 **GEO-ready**: capture **AI Overviews** and the reference links Google cites, so you can monitor Generative Engine Optimization (GEO/AEO) as AI answers reshape search
- ❓ **People Also Ask with answers**: pull PAA questions, full answers and source URLs — map content gaps and build FAQ schema fast
- 💰 **Pay per query**: transparent per-query pricing; failed lookups land as `status:"error"` rows at **$0** — you're never billed for a hiccup
- ✨ **No API key, zero setup**: no Google Cloud project, no SerpAPI key, no proxy config — paste an input and run

### ✨ Features

- 🔍 **Google Search**: organic results with title, URL, snippet, domain, position and rank, plus a `hasAiOverviews` flag and total result count
- 🧩 **Full SERP mode**: the entire results page — Knowledge Graph, answer box, AI Overviews, top stories, inline videos, ads, places, discussions and related searches as structured blocks
- ⚡ **Fast Light Search**: organic-only results optimized for the lowest possible latency — ideal for RAG and real-time apps
- 📚 **Bulk Search**: up to 100 queries in one request, each charged a single credit — track ranks for an entire keyword list per run
- 🤖 **Google AI Mode**: Google's generative AI Mode answer plus the reference links it cites *(when available from Google)*
- ❓ **People Also Ask**: the PAA questions with full answers and source attribution (URL, domain, title)
- 🌍 **Localization**: country (`gl`), language (`hl`), specific location, device profile and Google `tbs` time filters
- 🔁 **Built-in retries**: transient upstream hiccups (429/502/503/504) are retried automatically with backoff
- 📊 **HTML run report**: every run writes a summary report (success/error counts, queries charged, duration) to the key-value store
- 🧹 **Clean camelCase JSON**: curated field names, absolute HTTPS URLs, no messy nested raw dumps

### 🎯 Operations

Pick **one operation per run** from the `operation` dropdown:

| Operation | What it returns | Required input |
|---|---|---|
| 🔍 **Google Search** (`search`) | Organic results + AI Overviews flag + total count | `query` |
| 🧩 **Full SERP** (`searchFull`) | Whole page: organic + Knowledge Graph + answer box + videos + PAA + ads + related | `query` |
| ⚡ **Fast Light Search** (`searchLight`) | Fast organic-only results | `query` |
| 📚 **Bulk Search** (`bulkSearch`) | Organic results for up to 100 queries, charged per query | `queries` (array) |
| 🤖 **AI Mode** (`aiMode`) | Google's generative answer + reference links | `prompt` |
| ❓ **People Also Ask** (`peopleAlsoAsk`) | PAA questions + answers + source attribution | `query` |

💡 **Tip:** Use **Bulk Search** to track ranks for a whole keyword list in one run, then drill into a single query with **Full SERP** to capture its rich features.

#### Which mode should I pick?

- **Just need the ranking links?** → **Fast Light Search** (cheapest, fastest) or **Google Search** (adds the AI Overviews flag + total count).
- **Need the rich SERP features** (Knowledge Graph, answer box, videos, ads, related searches)? → **Full SERP**.
- **Tracking many keywords at once?** → **Bulk Search** — one run, up to 100 queries, charged per query.
- **Researching questions / content gaps?** → **People Also Ask**.
- **Monitoring Google's generative answers?** → **AI Mode** (and `fetchAiOverviews` on the search modes).

### 🚀 Quick Start

1. Open the actor and select an **Operation** from the dropdown.
2. Fill the required input for that mode:
   - For **Google Search / Full SERP / Fast Light / People Also Ask** → a `query`
   - For **Bulk Search** → a list of `queries` (use *Bulk edit* to paste one per line)
   - For **AI Mode** → a `prompt`
3. (Optional) Set `country`, `language`, `num` (result count), `location`, and toggle `fetchAiOverviews`.
4. Click **Start** and collect clean rows from the dataset.

#### Example — track ranks for a keyword list (Bulk Search)

```json
{
  "operation": "bulkSearch",
  "queries": [
    "best web scraping tools",
    "google serp api",
    "ai overview scraper",
    "rank tracking software"
  ],
  "num": 10,
  "country": "us"
}
````

#### Example — capture AI Overviews + Knowledge Graph (Full SERP)

```json
{
  "operation": "searchFull",
  "query": "what is generative engine optimization",
  "fetchAiOverviews": true,
  "num": 10,
  "country": "us"
}
```

#### Example — content research (People Also Ask)

```json
{
  "operation": "peopleAlsoAsk",
  "query": "web scraping",
  "fetchAnswers": true,
  "country": "us"
}
```

### 📥 Input Reference

| Field | Type | Applies to | Description |
|---|---|---|---|
| `operation` | enum | all | `search` · `searchFull` · `searchLight` · `bulkSearch` · `aiMode` · `peopleAlsoAsk` |
| `query` | string | search, searchFull, searchLight, peopleAlsoAsk | The search query |
| `queries` | array | bulkSearch | Up to 100 queries, one credit each |
| `prompt` | string | aiMode | Natural-language prompt for AI Mode |
| `country` | string | all | ISO country code (`gl`), default `us` |
| `language` | string | all | ISO language code (`hl`), default `en` |
| `num` | integer | search modes | Number of organic results per query |
| `start` | integer | search, searchFull | Result offset for pagination |
| `location` | string | search, searchFull, peopleAlsoAsk | Specific geographic location |
| `device` | enum | search | `desktop` · `mobile` · `tablet` |
| `tbs` | string | search, searchFull | Google `tbs` time/advanced filter (e.g. `qdr:w`) |
| `fetchAiOverviews` | boolean | search, searchFull | Request Google's AI Overview block |
| `fetchAnswers` | boolean | peopleAlsoAsk | Return full answer text (default on) |
| `sessionToken` | string | aiMode | Continue an AI Mode conversation |

### 📤 Output

Every row is a flat JSON object with curated camelCase fields. Filter by `_operation` and `_resultType` to split modes.

**Organic result row (search / searchFull / searchLight / bulkSearch):**

```json
{
  "_operation": "search",
  "_resultType": "organic",
  "resultTitle": "Apify: Full-stack web scraping and data extraction platform",
  "url": "https://apify.com/",
  "snippet": "Cloud platform for web scraping, browser automation, AI agents...",
  "domain": "apify.com",
  "position": 1,
  "rank": 1,
  "hasAiOverviews": true,
  "totalOrganicResults": 84000000,
  "country": "us",
  "status": "success"
}
```

**SERP features row (searchFull — one per call):** holds `knowledgeGraph`, `answerBox`, `aiOverviews`, `topStories`, `inlineVideos`, `places`, `relatedSearches`, `ads`.

**People Also Ask row:**

```json
{
  "_operation": "peopleAlsoAsk",
  "_resultType": "people_also_ask",
  "question": "What does Apify do?",
  "answer": "Apify is a cloud platform for web scraping, browser automation...",
  "sourceUrl": "https://apify.com/",
  "sourceDomain": "apify.com",
  "position": 1,
  "status": "success"
}
```

An **HTML run report** is written to the default key-value store as `report.html`.

#### Full field reference

Common metadata on every row:

| Field | Type | Description |
|---|---|---|
| `_operation` | string | The operation that produced the row (`search`, `searchFull`, …) |
| `_resultType` | string | `organic` · `serp_features` · `people_also_ask` · `ai_mode` · `empty` |
| `_sourceQuery` / `_sourcePrompt` | string | The query or prompt that produced the row |
| `_fetchedAt` | string | ISO timestamp when the row was fetched |
| `country` | string | The `gl` country used |
| `status` | string | `success` or `error` |
| `errorMessage` | string | Present only on `error` rows |

Organic-result fields (`_resultType: "organic"`):

| Field | Type | Description |
|---|---|---|
| `resultTitle` | string | The result title |
| `url` | string | The destination URL (absolute HTTPS) |
| `snippet` | string | The result snippet |
| `domain` | string | The result's domain |
| `displayedLink` | string | The breadcrumb-style displayed link |
| `source` | string | The source label, when present |
| `position` / `rank` | number | The position on the SERP |
| `date` | string | Published date, when present |
| `snippetHighlightedWords` | array | Words Google bolded in the snippet |
| `videoThumbnail` | string | Thumbnail URL for video results |
| `totalOrganicResults` | number | Total result count Google reports |
| `hasAiOverviews` | boolean | Whether an AI Overview was present |

SERP-features fields (`_resultType: "serp_features"`, Full SERP only):

| Field | Type | Description |
|---|---|---|
| `knowledgeGraph` | object | `kgTitle`, `kgType`, `kgmid`, `kgDescription`, `kgAttributes` |
| `answerBox` | object | `answerType`, `answerText` |
| `aiOverviews` | object | Google's AI Overview `text_parts` + `reference_links` |
| `ads` | array | Paid results |
| `topStories` | array | Top stories carousel |
| `inlineVideos` | array | Inline video results |
| `places` | array | Local pack / places |
| `discussionsAndForums` | array | Discussions & forums block |
| `relatedSearches` | array | Related searches |

AI-Mode fields (`_resultType: "ai_mode"`):

| Field | Type | Description |
|---|---|---|
| `aiAnswer` | string | The stitched plain-text generative answer |
| `replyParts` | array | The structured answer parts |
| `referenceLinks` | array | The sources Google cited |
| `sessionToken` | string | Token to continue the conversation |

People-Also-Ask fields (`_resultType: "people_also_ask"`):

| Field | Type | Description |
|---|---|---|
| `question` | string | The PAA question |
| `answer` | string | The full answer (when `fetchAnswers` is on) |
| `sourceUrl` / `sourceDomain` / `sourceTitle` | string | Source attribution |
| `position` | number | The question's order |

### 💰 Pricing

This actor uses **pay-per-event** pricing — you pay for what you extract, with a small flat fee per run.

| Event | What it covers |
|---|---|
| **Actor Start** | Charged once per run when input validation passes |
| **Search Result** | Charged per query for Google Search, Fast Light, and **each query** in Bulk Search |
| **Full SERP Result** | Charged per result for the heavy Full SERP mode |
| **People Also Ask Result** | Charged per People-Also-Ask call |

- **Bulk Search is charged per query**, not per result — submit 100 queries, pay for 100 queries, get every result.
- Failed lookups are saved as `status:"error"` rows and are **never charged**.
- See the actor's **Pricing** tab for live per-tier rates.

### 🌍 Localization & Advanced Options

Every search mode supports Google's localization parameters:

- **`country` (`gl`)** — localize results to a country: `us`, `gb`, `de`, `ca`, `in`, `br`, `fr`, `jp`, …
- **`language` (`hl`)** — set the UI language: `en`, `es`, `de`, `pt`, …
- **`location`** — search as if from a specific place: `New York, NY`, `London, United Kingdom`.
- **`device`** — `desktop` (default), `mobile` or `tablet` (Google Search mode).
- **`tbs`** — Google's advanced/time filter: `qdr:d` (past day), `qdr:w` (past week), `qdr:m` (past month).
- **`num` / `start`** — control how many results and the offset for pagination.

These make it easy to run the **same keyword across many markets** — loop the actor over a list of countries to build a per-market rank table.

### 💡 Use Cases

- **SERP rank tracking at scale** — submit a keyword list via Bulk Search and capture organic positions, domains and snippets for each, country by country, on a schedule. Feed the rows into a dashboard to watch movement over time.
- **GEO & AI Overview monitoring** — capture Google's AI Overviews and the sources it cites to track Generative Engine Optimization (GEO/AEO) as AI answers reshape search. Know when Google starts (or stops) showing an AI Overview for your target queries, and which domains it surfaces.
- **Keyword & People-Also-Ask research** — pull PAA questions with answers and source attribution to map content gaps, build FAQ schema, and discover the real questions searchers ask around a topic.
- **Brand & market SERP intelligence** — use Full SERP to extract the entire result page — organic, ads, top stories, videos, places and Knowledge Graph — for brand monitoring, share-of-voice and competitive analysis without running a browser farm.
- **Search data for LLMs & RAG pipelines** — feed clean, structured Google results and AI Overviews into LLM apps, RAG pipelines and AI agents. Fast Light mode keeps latency low for real-time retrieval; Bulk Search batches large query sets.

### 🆚 Why this actor

| | This actor | Typical single-purpose SERP scraper |
|---|---|---|
| Organic results | ✅ | ✅ |
| AI Overviews | ✅ | ❌ usually |
| Knowledge Graph + answer box | ✅ | ❌ |
| People Also Ask + answers | ✅ | ❌ |
| Bulk 100 queries / call | ✅ | ❌ |
| Google AI Mode | ✅ *(when available)* | ❌ |
| No API key / proxy setup | ✅ | varies |
| Pay per query | ✅ | varies |

### ❓ FAQ

**Do I need a Google API key or a SerpAPI subscription?**
No. The actor handles the backend, proxies and parsing. Paste an input and run.

**How many queries can I run at once?**
Up to **100 queries in a single Bulk Search run**, each charged one credit. For single queries, use the Google Search, Full SERP, or Fast Light modes.

**Do I always get AI Overviews?**
AI Overviews are generated by Google and only appear for certain (usually informational) queries — enable `fetchAiOverviews` and check the `hasAiOverviews` flag and `aiOverviews` field on the row. When Google shows an AI Overview for your query, it's captured.

**What's the difference between Full SERP and Google Search?**
Google Search returns organic results plus an AI Overviews flag. Full SERP returns the **entire** results page — Knowledge Graph, answer box, top stories, inline videos, ads, places, discussions and related searches — as structured blocks.

**Which mode is fastest?**
Fast Light Search returns organic-only results with the lowest latency, ideal for real-time and RAG use.

**Am I charged for empty or failed queries?**
Failed lookups are saved as `status:"error"` rows and are not charged. In Bulk Search, each submitted query consumes one credit (this maps to the upstream cost), even if a particular query returns no results.

**Can I localize results?**
Yes — set `country` (`gl`), `language` (`hl`), a specific `location`, `device`, and Google `tbs` time filters.

**Can I run this on a schedule?**
Yes. Use Apify's **Schedules** to run any operation at a fixed interval — ideal for daily rank tracking or AI-Overview monitoring. Each run appends to a fresh dataset you can export or pipe to a webhook.

**How do I export the data?**
From the run's **Dataset** tab, export to JSON, CSV, Excel, or pull it via the Apify API. Integrations include Google Sheets, Make, Zapier and direct webhooks.

**What happens to error rows?**
Rows with `status: "error"` carry a friendly `errorMessage` and are **not charged**. Filter them out with `_resultType` / `status` when processing.

### 🧭 Tips for Best Results

- **Use Bulk Search for keyword lists.** It's the cheapest way to track many queries — one credit each, all results returned.
- **Enable `fetchAiOverviews` for informational queries.** AI Overviews appear most for "what is…", "how to…", "benefits of…" style queries; check `hasAiOverviews` on the row.
- **Pick the lightest mode that has what you need.** Fast Light < Google Search < Full SERP in both cost and latency.
- **Localize deliberately.** A query ranks differently per country and language — set `gl` and `hl` to match the market you care about.
- **Schedule it.** Rank tracking and GEO monitoring are time-series problems — run daily and diff the datasets.

### 🔌 Integrations

The output dataset works with the full Apify ecosystem:

- **Export** to JSON, CSV, Excel, XML or RSS from the Dataset tab.
- **API** — pull results programmatically via the Apify API or client libraries (JS, Python).
- **No-code** — connect to Make, Zapier, n8n and Google Sheets.
- **Webhooks** — trigger downstream pipelines when a run finishes.
- **Schedules** — automate recurring rank tracking and GEO monitoring.

### 🔗 More by SIÁN Agency

- [Trustpilot Reviews Scraper](https://apify.com/sian.agency/trustpilot-reviews-scraper?fpr=sian) — Company reputation & consumer reviews
- [Smart Idealista Scraper](https://apify.com/sian.agency/smart-idealista-scraper?fpr=sian) — Property listings & market data
- [Instagram AI Transcript Extractor](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian) — Reels & video transcripts
- [Browse all SIÁN actors →](https://apify.com/sian.agency?fpr=sian)

⭐ **Love this actor?** Leave a [5-star review](https://apify.com/sian.agency/google-serp-scraper/reviews) — it helps us build more features for you.

### 📨 Support

Questions, bugs or feature requests? Use the **Issues** tab in the Apify Console, or reach us at **apify@sian-agency.online**. We build these tools together with the community.

### ⚠️ Trademark Disclaimer

This actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by Google LLC**. "Google", "Google Search", "AI Overviews", "Knowledge Graph" and related marks are trademarks of Google LLC. This actor accesses publicly available Google search results data through a third-party real-time search backend and does not use any official Google API. All product names, logos and brands are property of their respective owners and are used for identification purposes only.

### 📜 Legal & Compliance

This actor extracts **publicly available** search results data. You are responsible for using the output in compliance with applicable laws and the terms of the sources involved, including data-protection regulations such as **GDPR** and **CCPA**. Do not use the data to identify, profile or target individuals unlawfully. For guidance on ethical and legal web scraping, see Apify's [guide to web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

***

*Published by **SIÁN Agency** (SIÁN OÜ, Tallinn, Estonia). Building reliable, transparent data tools on Apify.*

# Actor input Schema

## `operation` (type: `string`):

🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.

- **🔍 Google Search** — organic results + AI Overviews flag + total result count, for one query
- **🧩 Full SERP** — the whole page: organic, ads, Knowledge Graph, answer box, top stories, videos, places, People-Also-Ask blocks & related searches
- **⚡ Fast Light Search** — fast organic-only results, lowest latency
- **📚 Bulk Search** — submit up to **100 queries in one run**, charged one credit per query — built for rank tracking & keyword sweeps
- **🤖 AI Mode** — Google's generative AI Mode answer + the reference links it cites
- **❓ People Also Ask** — the PAA questions with full answers and source attribution

💡 **TIP:** Use Bulk Search to track ranks for a whole keyword list in a single run.

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

🔍 **Required for `Google Search`, `Full SERP`, `Fast Light Search`, and `People Also Ask`.**

A free-form Google search query — exactly what you would type into the Google search box.

- `best web scraping tools`
- `apify`
- `how to track keyword rankings`

💡 **TIP:** Use the `Country` and `Language` fields below to localize results.

⚠️ **Ignored** for Bulk Search (use `Queries`) and AI Mode (use `Prompt`).

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

📚 **Required for `Bulk Search`.**

Up to **100 search queries** processed in a single run — each query consumes one credit.

💡 **BULK EDIT:** Click "Bulk edit" to paste one query per line.

Ideal for tracking ranks across a keyword list or running a research sweep.

⚠️ **Ignored** for all other operations.

## `prompt` (type: `string`):

🤖 **Required for `AI Mode`.**

The natural-language prompt for Google's AI Mode — a question or instruction.

- `What are the best open-source web scraping libraries?`
- `Compare Apify and Scrapy for large crawls`

Returns the generative answer plus the reference links Google cites.

⚠️ **Ignored** for all other operations.

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

🌍 ISO 3166-1 alpha-2 country code that localizes the search (e.g. `us`, `gb`, `ca`, `de`, `in`, `br`). Default `us`.

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

Optional. ISO 639 UI language code for results (e.g. `en`, `es`, `de`, `pt`). Default `en`.

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

Optional. How many organic results to request (per query). Applies to Google Search, Full SERP, Fast Light, and Bulk Search. Typical Google page = 10. Leave blank for the default.

## `start` (type: `integer`):

Optional. Result offset for pagination (e.g. `10` to start at the 2nd page). Applies to Google Search and Full SERP.

## `fetchAiOverviews` (type: `boolean`):

Optional. When enabled, requests Google's AI Overview block for the query (Google Search & Full SERP). Adds latency but captures generative answers for GEO monitoring.

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

Optional. A specific geographic location to search from (e.g. `New York, NY`, `London, United Kingdom`). Applies to Google Search, Full SERP, and People Also Ask.

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

Optional. Device profile for the search.

- `desktop` (default)
- `mobile`
- `tablet`

## `tbs` (type: `string`):

Optional. Google `tbs` advanced search parameter — e.g. `qdr:d` (past day), `qdr:w` (past week), `qdr:m` (past month). Applies to Google Search and Full SERP.

## `fetchAnswers` (type: `boolean`):

For `People Also Ask` — when enabled (default), returns the full answer text for each question (consumes an extra credit). Disable to get questions only.

## `sessionToken` (type: `string`):

Optional. For `AI Mode` — pass a `sessionToken` from a previous AI Mode response to continue the same conversation thread.

## Actor input object example

```json
{
  "operation": "search",
  "query": "best web scraping tools",
  "queries": [
    "best web scraping tools",
    "google serp api",
    "apify"
  ],
  "prompt": "What are the best web scraping tools in 2026?",
  "country": "us",
  "language": "en",
  "num": 10,
  "fetchAiOverviews": false,
  "device": "desktop",
  "fetchAnswers": true
}
```

# Actor output Schema

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

Per-row results — one flat row per organic result, PAA question, AI-mode answer, or SERP-features summary, with curated camelCase fields (resultTitle, url, snippet, domain, position, aiOverviews, knowledgeGraph, question, answer, …).

## `report` (type: `string`):

HTML report with run status, success/error row counts, success rate, queries charged, duration, and the inputs used — written even on fatal crash.

# 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 = {
    "query": "best web scraping tools",
    "queries": [
        "best web scraping tools",
        "google serp api",
        "apify"
    ],
    "prompt": "What are the best web scraping tools in 2026?",
    "country": "us",
    "language": "en",
    "num": 10,
    "start": 0,
    "location": "",
    "tbs": "",
    "sessionToken": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/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 = {
    "query": "best web scraping tools",
    "queries": [
        "best web scraping tools",
        "google serp api",
        "apify",
    ],
    "prompt": "What are the best web scraping tools in 2026?",
    "country": "us",
    "language": "en",
    "num": 10,
    "start": 0,
    "location": "",
    "tbs": "",
    "sessionToken": "",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/google-serp-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 '{
  "query": "best web scraping tools",
  "queries": [
    "best web scraping tools",
    "google serp api",
    "apify"
  ],
  "prompt": "What are the best web scraping tools in 2026?",
  "country": "us",
  "language": "en",
  "num": 10,
  "start": 0,
  "location": "",
  "tbs": "",
  "sessionToken": ""
}' |
apify call sian.agency/google-serp-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SERP API — Google Search, AI Overviews & Bulk Scraper",
        "description": "Scrape Google SERPs at scale — organic results, AI Overviews, Knowledge Graph, Answer Box, videos & People Also Ask. Bulk up to 100 queries per call for rank tracking and keyword research. Clean JSON, pay per query.",
        "version": "1.0",
        "x-build-id": "crKWjWirMhmcLJjcu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~google-serp-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-google-serp-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/sian.agency~google-serp-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-google-serp-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/sian.agency~google-serp-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-google-serp-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": [
                    "operation"
                ],
                "properties": {
                    "operation": {
                        "title": "🎯 Operation — what do you want to scrape?",
                        "enum": [
                            "search",
                            "searchFull",
                            "searchLight",
                            "bulkSearch",
                            "aiMode",
                            "peopleAlsoAsk"
                        ],
                        "type": "string",
                        "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **🔍 Google Search** — organic results + AI Overviews flag + total result count, for one query\n- **🧩 Full SERP** — the whole page: organic, ads, Knowledge Graph, answer box, top stories, videos, places, People-Also-Ask blocks & related searches\n- **⚡ Fast Light Search** — fast organic-only results, lowest latency\n- **📚 Bulk Search** — submit up to **100 queries in one run**, charged one credit per query — built for rank tracking & keyword sweeps\n- **🤖 AI Mode** — Google's generative AI Mode answer + the reference links it cites\n- **❓ People Also Ask** — the PAA questions with full answers and source attribution\n\n💡 **TIP:** Use Bulk Search to track ranks for a whole keyword list in a single run.",
                        "default": "search"
                    },
                    "query": {
                        "title": "🔍 Search Query",
                        "type": "string",
                        "description": "🔍 **Required for `Google Search`, `Full SERP`, `Fast Light Search`, and `People Also Ask`.**\n\nA free-form Google search query — exactly what you would type into the Google search box.\n- `best web scraping tools`\n- `apify`\n- `how to track keyword rankings`\n\n💡 **TIP:** Use the `Country` and `Language` fields below to localize results.\n\n⚠️ **Ignored** for Bulk Search (use `Queries`) and AI Mode (use `Prompt`)."
                    },
                    "queries": {
                        "title": "📚 Queries (for Bulk Search)",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "📚 **Required for `Bulk Search`.**\n\nUp to **100 search queries** processed in a single run — each query consumes one credit.\n\n💡 **BULK EDIT:** Click \"Bulk edit\" to paste one query per line.\n\nIdeal for tracking ranks across a keyword list or running a research sweep.\n\n⚠️ **Ignored** for all other operations.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "prompt": {
                        "title": "🤖 Prompt (for AI Mode)",
                        "type": "string",
                        "description": "🤖 **Required for `AI Mode`.**\n\nThe natural-language prompt for Google's AI Mode — a question or instruction.\n- `What are the best open-source web scraping libraries?`\n- `Compare Apify and Scrapy for large crawls`\n\nReturns the generative answer plus the reference links Google cites.\n\n⚠️ **Ignored** for all other operations."
                    },
                    "country": {
                        "title": "🌍 Country (gl)",
                        "type": "string",
                        "description": "🌍 ISO 3166-1 alpha-2 country code that localizes the search (e.g. `us`, `gb`, `ca`, `de`, `in`, `br`). Default `us`."
                    },
                    "language": {
                        "title": "🗣️ Language (hl)",
                        "type": "string",
                        "description": "Optional. ISO 639 UI language code for results (e.g. `en`, `es`, `de`, `pt`). Default `en`."
                    },
                    "num": {
                        "title": "🔢 Number of results",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Optional. How many organic results to request (per query). Applies to Google Search, Full SERP, Fast Light, and Bulk Search. Typical Google page = 10. Leave blank for the default."
                    },
                    "start": {
                        "title": "↪️ Start offset",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional. Result offset for pagination (e.g. `10` to start at the 2nd page). Applies to Google Search and Full SERP."
                    },
                    "fetchAiOverviews": {
                        "title": "✨ Fetch AI Overviews",
                        "type": "boolean",
                        "description": "Optional. When enabled, requests Google's AI Overview block for the query (Google Search & Full SERP). Adds latency but captures generative answers for GEO monitoring.",
                        "default": false
                    },
                    "location": {
                        "title": "📍 Location",
                        "type": "string",
                        "description": "Optional. A specific geographic location to search from (e.g. `New York, NY`, `London, United Kingdom`). Applies to Google Search, Full SERP, and People Also Ask."
                    },
                    "device": {
                        "title": "📱 Device (for Google Search)",
                        "enum": [
                            "desktop",
                            "mobile",
                            "tablet"
                        ],
                        "type": "string",
                        "description": "Optional. Device profile for the search.\n\n- `desktop` (default)\n- `mobile`\n- `tablet`",
                        "default": "desktop"
                    },
                    "tbs": {
                        "title": "🕓 Time / advanced filter (tbs)",
                        "type": "string",
                        "description": "Optional. Google `tbs` advanced search parameter — e.g. `qdr:d` (past day), `qdr:w` (past week), `qdr:m` (past month). Applies to Google Search and Full SERP."
                    },
                    "fetchAnswers": {
                        "title": "💬 Fetch PAA answers",
                        "type": "boolean",
                        "description": "For `People Also Ask` — when enabled (default), returns the full answer text for each question (consumes an extra credit). Disable to get questions only.",
                        "default": true
                    },
                    "sessionToken": {
                        "title": "🔑 Session token (for AI Mode)",
                        "type": "string",
                        "description": "Optional. For `AI Mode` — pass a `sessionToken` from a previous AI Mode response to continue the same conversation thread."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
