# Google SERP Scraper (`dataforseo/google-serp-scraper`) Actor

Scrape Google search results (organic, ads, People Also Ask, AI Overview, local pack and more) for any keyword, location, language and device. Powered by the DataForSEO SERP API.

- **URL**: https://apify.com/dataforseo/google-serp-scraper.md
- **Developed by:** [DataForSEO](https://apify.com/dataforseo) (community)
- **Security:** Limited permissions
- **Stats:** 5 total users, 3 monthly users, 93.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 serp results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/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

Get structured Google search results for any keyword, in any country, language and device — organic listings, ads, People Also Ask, AI Overview, featured snippets, the local pack and more. Give it a list of search terms and it returns clean, ready-to-analyze data, one row per results page.

Built on the DataForSEO SERP API. You don't need a DataForSEO account or an API key — just run the Actor.

### What you get

- **Full organic results** — title, URL, position, absolute rank, description, displayed URL, domain, sitelinks and publish date.
- **Every SERP feature Google showed** — the `serpFeatures` field always lists all element types on the page (e.g. `knowledge_graph`, `top_stories`, `video`), even the ones that aren't broken out into their own field. This is where this Actor goes deeper than most.
- **Ads** (`paidResults`), **People Also Ask** (flattened question/answer pairs), **related searches**, **featured snippet**, **local pack**.
- **AI Overview** — Google's generative answer with its source references. Included for free whenever Google shows one; the optional add-on additionally fetches AI Overviews that Google loads asynchronously.
- **A link to the live Google results** (`url`) for every page, so you can verify any row by eye.

### How it works

Results are fetched through DataForSEO's task-queue, so a run is not instant: **most results arrive within about 5 minutes**, and they are written to your dataset **gradually, as each query finishes** — you'll see rows appear during the run rather than all at once. The order of rows is not guaranteed; use the `searchQuery` fields inside each row to tie a result back to its query.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| **Search queries** | text, one per line — *required* | — | The terms to search. Blank lines are ignored, duplicates removed. Up to 700 characters each. Google operators (`site:`, `intitle:`, …) are allowed. |
| **Results per query** | integer | `10` | How many organic results to fetch (10–100, in steps of 10). **Affects cost**: you're billed per page of 10, so `30` costs 3× `10`. |
| **Location** | select | `United States` | Country to search from. Regions and cities (e.g. `London,England,United Kingdom`) are supported via the API. |
| **Language** | select | `English` | Interface language of the search. |
| **Device** | select | `desktop` | `desktop` or `mobile`. |
| **People Also Ask — expansion depth** | integer | `0` | How deep to open the PAA box (0–4). **Affects cost**: each expansion click that returns an answer is billed. |
| **Include AI Overview** | checkbox | `false` | AI Overviews are always included for free when Google shows them. This **paid add-on** additionally fetches ones Google loads asynchronously. |

#### Example input

```json
{
  "queries": "web scraping api\nbest coffee machine\nsite:apify.com actor",
  "depth": 10,
  "location": "United States",
  "language": "English",
  "device": "desktop",
  "peopleAlsoAskDepth": 0,
  "includeAiOverview": false
}
```

### Output

One dataset item = one Google results page (up to 10 organic results). For `depth` above 10 you get one item per page. The **Output** tab has two ready-made views: **Overview** (one row per page) and **Organic results** (one row per organic listing — the view most people export to CSV or Excel). Both export cleanly to JSON, CSV and Excel.

#### Example output item (real result for `web scraping api`, US / English / desktop, AI Overview add-on on)

Trimmed to two organic results and three AI Overview references for readability; a real run returns the full lists.

```json
{
	"searchQuery": {
		"term": "fast blender 2026",
		"page": 1,
		"device": "desktop",
		"location": "United States",
		"language": "English",
		"domain": "google.com"
	},
	"url": "https://www.google.com/search?q=fast%20blender%202026&hl=en&gl=US&ie=UTF-8&uule=w+CAIQIFISCQs2MuSEtepUEUK33kOSuTsc",
	"resultsTotal": 155,
	"serpFeatures": [
		"ai_overview",
		"organic",
		"video",
		"people_also_ask",
		"related_searches"
	],
	"organicResultsCount": 8,
	"paidResultsCount": 0,
	"organicResults": [
		{
			"position": 1,
			"rankAbsolute": 2,
			"title": "Best Blender Settings 2026 (Faster Render + No Lag)",
			"url": "https://www.youtube.com/watch?v=Qlz1xeqfc6g",
			"displayedUrl": "6.4K+ views  ·  7 months ago",
			"description": null,
			"domain": "www.youtube.com",
			"date": "2026-01-21 00:00:00 +00:00",
			"siteLinks": []
		},
		{
			"position": 2,
			"rankAbsolute": 5,
			"title": "How to Learn Blender in 2026",
			"url": "https://www.youtube.com/watch?v=SkRdc0ShV_U",
			"displayedUrl": "25K+ views  ·  8 months ago",
			"description": null,
			"domain": "www.youtube.com",
			"date": "2025-12-27 00:00:00 +00:00",
			"siteLinks": []
		},
		{
			"position": 3,
			"rankAbsolute": 6,
			"title": "The 10 Best Blenders of 2026, Tested & Reviewed",
			"url": "https://www.seriouseats.com/best-blenders-8548162",
			"displayedUrl": "https://www.seriouseats.com › ... › Electric Appliances",
			"description": "Jun 9, 2026 — The Vitamix 5200 has been our best blender for more than a decade. It has a simple interface and blades capable of pulverizing anything. Read more",
			"domain": "www.seriouseats.com",
			"date": "2026-06-09 00:00:00 +00:00",
			"siteLinks": [
				{
					"title": "Read more",
					"url": "https://www.seriouseats.com/best-blenders-8548162#:~:text=The%20Vitamix%205200%20has%20been,blades%20capable%20of%20pulverizing%20anything."
				}
			]
		},
		{
			"position": 4,
			"rankAbsolute": 7,
			"title": "The 4 Best Blenders of 2026 | Reviews by Wirecutter",
			"url": "https://www.nytimes.com/wirecutter/reviews/best-blender/",
			"displayedUrl": "https://www.nytimes.com › ... › Small kitchen appliances",
			"description": "Aug 25, 2026 — After testing more than 25 blenders since 2012, we haven't found a better one than the powerful, durable Vitamix 5200.",
			"domain": "www.nytimes.com",
			"date": "2026-08-25 00:00:00 +00:00",
			"siteLinks": []
		},
		{
			"position": 5,
			"rankAbsolute": 8,
			"title": "Projects to Look Forward to in 2026",
			"url": "https://www.blender.org/development/projects-to-look-forward-to-in-2026/",
			"displayedUrl": "https://www.blender.org › development › projects-to-lo...",
			"description": "Jan 30, 2026 — Faster startup and EEVEE shader compilation. Faster Video Sequencer with HDR support. . Nearly 400 bugs fixed. The planned releases for 2026 ...",
			"domain": "www.blender.org",
			"date": "2026-01-30 00:00:00 +00:00",
			"siteLinks": []
		},
		{
			"position": 6,
			"rankAbsolute": 9,
			"title": "Best Blenders at Every Budget (2026 Review)",
			"url": "https://www.eatingbyelaine.com/blenders-at-every-budget/",
			"displayedUrl": "https://www.eatingbyelaine.com › Recipes › How To",
			"description": "Jun 11, 2022 — KitchenAid K400 Variable Speed ($209.95) Beast Health Blenders ($99-199) - new 2026 model. Nutribullet Personal Blender ($58.00)",
			"domain": "www.eatingbyelaine.com",
			"date": "2022-06-11 00:00:00 +00:00",
			"siteLinks": []
		},
		{
			"position": 7,
			"rankAbsolute": 10,
			"title": "Learn Blender in 2026: The Fastest and Easiest Way",
			"url": "https://www.youtube.com/watch?v=yyQm-xjM4OE",
			"displayedUrl": "310+ views  ·  7 months ago",
			"description": null,
			"domain": "www.youtube.com",
			"date": "2026-01-23 00:00:00 +00:00",
			"siteLinks": []
		},
		{
			"position": 8,
			"rankAbsolute": 11,
			"title": "The 9 Best Blenders of 2026, According to Our Tests",
			"url": "https://www.foodandwine.com/best-blenders-7110355",
			"displayedUrl": "https://www.foodandwine.com › ... › Small Appliances",
			"description": "Jun 4, 2026 — KitchenAid K400 Variable Speed Blender ($300 at Amazon) ; Ninja Compact Kitchen System ($180 at Amazon) ; Vitamix Propel 510 Blender ($500 at ... Read more",
			"domain": "www.foodandwine.com",
			"date": "2026-06-04 00:00:00 +00:00",
			"siteLinks": [
				{
					"title": "Read more",
					"url": "https://www.foodandwine.com/best-blenders-7110355#:~:text=KitchenAid%20K400%20Variable%20Speed%20Blender,(%24300%20at%20Amazon)&text=Ninja%20Compact%20Kitchen%20System%20(%24180,at%20Amazon)&text=Vitamix%20Propel%20510%20Blender%20(%24500,at%20Amazon)"
				}
			]
		}
	],
	"paidResults": [],
	"featuredSnippet": null,
	"peopleAlsoAsk": [
		{
			"question": "Which blender is the fastest?",
			"answer": null,
			"title": null,
			"url": null
		},
		{
			"question": "Is blender still worth learning in 2026?",
			"answer": null,
			"title": null,
			"url": null
		},
		{
			"question": "Which high speed blender is the best?",
			"answer": null,
			"title": null,
			"url": null
		},
		{
			"question": "Is blender 5 out yet?",
			"answer": null,
			"title": null,
			"url": null
		},
		{
			"question": "Is Blender struggling financially?",
			"answer": null,
			"title": null,
			"url": null
		},
		{
			"question": "Is Blender 5.0 faster?",
			"answer": null,
			"title": null,
			"url": null
		}
	],
	"relatedQueries": [
		{
			"title": "Fast blender 2026 reddit",
			"url": "https://google.com/search?q=Fast%20blender%202026%20reddit"
		},
		{
			"title": "Fast blender 2026 reviews",
			"url": "https://google.com/search?q=Fast%20blender%202026%20reviews"
		},
		{
			"title": "Best fast blender 2026",
			"url": "https://google.com/search?q=Best%20fast%20blender%202026"
		},
		{
			"title": "Fast blender 2026 amazon",
			"url": "https://google.com/search?q=Fast%20blender%202026%20amazon"
		},
		{
			"title": "Best budget blender 2026",
			"url": "https://google.com/search?q=Best%20budget%20blender%202026"
		},
		{
			"title": "Best blender for everything",
			"url": "https://google.com/search?q=Best%20blender%20for%20everything"
		},
		{
			"title": "Top 10 blender brands",
			"url": "https://google.com/search?q=Top%2010%20blender%20brands"
		},
		{
			"title": "Best blender for smoothies 2026",
			"url": "https://google.com/search?q=Best%20blender%20for%20smoothies%202026"
		}
	],
	"localPack": [],
	"aiOverview": {
		"text": null,
		"references": []
	},
	"meta": {
		"fetchedAt": "2026-09-15T06:46:10.003Z",
		"dataforseoTaskId": "09150645-8029-0066-0000-5e2b1edc5a09"
	}
}
```

> `aiOverview` is populated whenever Google returns an AI Overview (including free cached ones); it's `null` only when none is present. People Also Ask `answer`/`url` are filled only when Google returns an expandable text answer; Google increasingly serves these asynchronously, in which case only the `question` is available.

### Pricing

This Actor uses **pay-per-event** pricing. Charges are applied **when each query is submitted** — the same moment the underlying data source bills us — not when the results come back. Costs are driven by your input (number of queries, `depth`, and the add-ons you enable), so they're predictable before the run finishes.

| Event | When it's charged |
|---|---|
| **Actor start** | Once per run. |
| **Results page** | Once per results page requested (`depth` ÷ 10) for each query **without** a search operator. |
| **Results page (with operator)** | Same, but for queries containing a Google operator (`site:`, `intitle:`, etc.). These cost ~5× more upstream, so they're a separate, higher-priced event. |
| **AI Overview** | Once per query, when the add-on is on. Separate higher-priced event for operator queries. |
| **AI Overview (with operator)** | The operator variant of the above. |
| **PAA expansion** | Once per requested People Also Ask level (equals *People Also Ask — expansion depth*), per query. |

**Important — no refunds.** Because charges happen at submission and Apify has no refund mechanism, a query is charged even if it later returns fewer pages than requested, no People Also Ask box, or no AI Overview. This mirrors how the data source bills us. Notes:

- If a query fails to be **created** at submission, it is **not** charged.
- Google's AI Overview, when present, is included in every SERP result at no extra cost — the AI Overview add-on charge is for asking us to additionally fetch ones Google loads asynchronously.
- You can cap a run with a **budget limit** — when it's reached, the Actor stops submitting (and charging for) new queries and finishes cleanly.

### What this Actor does not do

By design, it does **not**:

- enrich results with leads, email addresses or email verification;
- return answers from ChatGPT, Gemini, Perplexity or Copilot (that's a separate AI Visibility Actor);
- extract the full page content of the ranking URLs (a separate product);
- accept Google URLs as input — keywords only;
- run its own scrapers, proxies or browsers — all data comes through the DataForSEO API.

### FAQ

**When exactly am I charged?** At submission — the moment each query's task is created (which is when the data source bills us), not when results arrive. Charges follow your input: `depth` ÷ 10 page events per query, plus one AI Overview event per query if that add-on is on, plus one People Also Ask event per requested expansion level. A query that can't be created at submission is not charged, and Apify has no way to refund after that point.

**A query returned fewer pages / no AI Overview / no PAA — why was it still charged?** Because charging happens at submission, before the results exist, and there are no refunds on Apify. This matches how we're billed upstream. If you don't need an add-on for a query set, leave it off.

**Why isn't it instant?** Results are fetched via a queue, which keeps the price low. Most complete within ~5 minutes and stream into your dataset as they finish.

**Do search operators cost more?** Yes. Queries containing `site:`, `inurl:`, `intitle:`, `filetype:` and similar operators cost ~5× more upstream on the results-page and AI Overview portions, so those are billed as separate, higher-priced events. (People Also Ask is not affected by operators.)

**Why is a People Also Ask `answer` sometimes empty?** Google increasingly serves PAA answers as an AI Overview that loads asynchronously, after the page is returned — in that case you get the `question` but the `answer` text isn't captured.

# Actor input Schema

## `queries` (type: `string`):

The search terms to look up on Google — one per line. Each query can be up to 700 characters.

You can use Google search operators (for example `site:example.com pricing` or `intitle:review`). Queries that contain an operator cost more per results page.

## `depth` (type: `integer`):

How many organic results to fetch for each query. Must be between 10 and 100, in steps of 10.

**This affects cost.** You are charged per results page (10 results = 1 page).

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

The country to search from. This sets which local version of Google is queried, so results match what a searcher in that country would see.

Need a specific region or city (for example `London,England,United Kingdom`)? Pick any country here and override it via the API — the Actor accepts any location supported by the data source and tells you clearly if a location can't be matched.

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

The interface language of the Google search. This influences the wording of results and features like AI Overview.

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

Whether to return results as seen on a desktop or a mobile device. Mobile results can differ in ranking and in which SERP features appear.

## `peopleAlsoAskDepth` (type: `integer`):

How deep to expand the "People Also Ask" box. `0` returns the box as shown on the page without opening the nested questions. Values from 1 to 4.

**This affects cost.**

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

Google's AI Overview is included in your results for free whenever Google shows one. **Turn this paid add-on on to additionally fetch AI Overviews that Google loads asynchronously.**

## Actor input object example

```json
{
  "queries": "web scraping api\nbest coffee machine\nsite:apify.com actor",
  "depth": 10,
  "location": "United States",
  "language": "English",
  "device": "desktop",
  "peopleAlsoAskDepth": 0,
  "includeAiOverview": false
}
```

# Actor output Schema

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

One item per Google results page. Open the Output tab to browse, or export to JSON, CSV or Excel.

# 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": `web scraping api
best coffee machine
site:apify.com actor`
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataforseo/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 = { "queries": """web scraping api
best coffee machine
site:apify.com actor""" }

# Run the Actor and wait for it to finish
run = client.actor("dataforseo/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 '{
  "queries": "web scraping api\\nbest coffee machine\\nsite:apify.com actor"
}' |
apify call dataforseo/google-serp-scraper --silent --output-dataset

```

## MCP server setup

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