# Google Search Results Scraper (SERP) Pro (`scrapers_lat/google-search-scraper-pro`) Actor

Scrape Google Search results at scale: organic results, ads, People Also Ask, related queries, featured snippets, knowledge panel, top stories and AI overview. Export JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/google-search-scraper-pro.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $47.27 / 1,000 serp pages

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

[![Google Search Results Scraper (SERP) Pro](https://scrapers.lat/banners/google-search-scraper-pro.png)](https://console.apify.com/actors/jC6l2tTDjHxA66rO1/input)

## Google Search Results Scraper (SERP) Pro

Here is one real result, with the fields the actor returns for a single results page (arrays trimmed for readability, values are real):

```json
{
  "searchQuery": {
    "term": "buy iphone 15 pro",
    "url": "https://www.google.com/search?q=buy+iphone+15+pro&num=10&hl=en&gl=us",
    "page": 1,
    "type": "web",
    "device": "DESKTOP",
    "countryCode": "us",
    "languageCode": "en",
    "locationUule": null,
    "resultsPerPage": 10
  },
  "resultsTotal": null,
  "organicResults": [
    {
      "title": "iphone 15 pro",
      "url": "https://www.bestbuy.com/site/searchpage.jsp?id=pcat17071&st=iphone%2015%20pro",
      "displayedUrl": "https://www.bestbuy.com › site › searchpage",
      "description": "Shop for iphone 15 pro at Best Buy. Find low everyday prices and buy online for delivery or in-store pick-up.",
      "position": 1,
      "date": null,
      "emphasizedKeywords": ["iphone 15 pro at Best Buy"],
      "siteLinks": [],
      "type": "organic"
    },
    {
      "title": "Apple iPhone 15 Pro, 256GB, Black Titanium - Unlocked ...",
      "url": "https://www.amazon.com/Apple-iPhone-15-Pro-Titanium/dp/B0CMZ5LT14",
      "displayedUrl": "https://www.amazon.com › Apple-iPhone-15-Pro-Titanium",
      "description": "Buy Apple iPhone 15 Pro, 256GB, Black Titanium - Unlocked (Renewed): FREE DELIVERY possible on eligible purchases.",
      "position": 2,
      "date": null,
      "emphasizedKeywords": ["Buy Apple iPhone 15 Pro, 256GB, Black Titanium"],
      "siteLinks": [],
      "type": "organic"
    }
  ],
  "paidResults": [],
  "paidProducts": [],
  "peopleAlsoAsk": [
    { "question": "Is the iPhone 15 Pro still being sold?", "answer": null, "title": null, "url": null },
    { "question": "Is the iPhone 15 Pro still worth buying?", "answer": null, "title": null, "url": null }
  ],
  "relatedQueries": [
    { "title": "Buy iphone 15 pro unlocked", "url": "https://www.google.com/search?q=Buy+iphone+15+pro+unlocked" },
    { "title": "iPhone 15 Pro Unlocked", "url": "https://www.google.com/search?q=iPhone+15+Pro+Unlocked" }
  ],
  "featuredSnippet": null,
  "knowledgePanel": {
    "title": "Apple iPhone 15 Pro",
    "type": null,
    "description": "The first iPhone to feature an aerospace-grade titanium design, featuring the A17 Pro chip and a pro camera system with multiple focal lengths.",
    "url": null,
    "attributes": {}
  },
  "topStories": [
    { "title": "Used iPhone 14 Pro or 15 pro?", "url": "https://www.reddit.com/r/iPhone15Pro/comments/1vso7ak/", "source": null, "date": "10+ comments · 1 day ago" }
  ],
  "localResults": [
    { "title": "Best Buy", "rating": null, "reviews": null, "address": "Salem, OR · (503) 371-0826" }
  ],
  "aiOverview": null,
  "pagination": { "currentPage": 1, "nextPageUrl": "https://www.google.com/search?q=buy+iphone+15+pro&start=10" },
  "serpFeatures": ["organic_results", "people_also_ask", "related_queries", "knowledge_panel", "top_stories", "local_results"],
  "htmlSnapshotUrl": null,
  "aiSerpIntelligence": null,
  "paaExpandedCount": null,
  "source": "google.com",
  "observedAt": "2026-08-21T14:26:02.034Z",
  "error": null
}
```

The most complete Google Search results scraper available. It returns every SERP block Google exposes for a query (organic results, text ads, shopping ads, People Also Ask, related searches, featured snippet, knowledge panel, top stories, local pack and AI overview when present), plus derived fields like `emphasizedKeywords`, `siteLinks` and a normalized `serpFeatures` list, and gives you a full set of filters (country, language, location, device, time range, search type and advanced operators) to target exactly the SERP you need.

**📥 [Input](https://apify.com/scrapers_lat/google-search-scraper-pro/input-schema) · 📤 [Output](https://apify.com/scrapers_lat/google-search-scraper-pro/output-schema) · 💰 [Pricing](https://apify.com/scrapers_lat/google-search-scraper-pro/pricing) · ▶️ [Examples](https://apify.com/scrapers_lat/google-search-scraper-pro/examples)**

![Apify](https://img.shields.io/badge/Platform-Apify-1CE1CE?logo=apify\&logoColor=white)
![Coverage](https://img.shields.io/badge/Coverage-Worldwide-blue)
![Output](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-orange)
![Billing](https://img.shields.io/badge/Billing-Pay%20per%20result%20page-brightgreen)

### Table of contents

- [What it does](#what-it-does)
- [Quickstart](#quickstart)
- [Input reference](#input-reference)
- [Output reference](#output-reference)
- [Example output record](#example-output-record)
- [Run via API and CLI](#run-via-api-and-cli)
- [Fetch results](#fetch-results)
- [Use cases](#use-cases)
- [How we compare](#how-we-compare)
- [Billing and limits](#billing-and-limits)
- [FAQ and troubleshooting](#faq-and-troubleshooting)

### What it does

Give the actor one or more search terms (or full Google search URLs) and it fetches the live Google results pages, parses every block on each page, and writes one clean record per results page to the dataset. It handles the country, language, device and location targeting for you, rotates its own connection so you never configure a proxy, and retries automatically on soft blocks so you get real parsed results rather than empty pages.

Each record mirrors the shape of the leading Apify SERP actors: a `searchQuery` object describing exactly what was searched, then `organicResults`, `paidResults`, `paidProducts`, `peopleAlsoAsk`, `relatedQueries`, `featuredSnippet`, `knowledgePanel`, `topStories`, `localResults`, `aiOverview`, `pagination` and a normalized `serpFeatures` list. Blocks that are not present on a given SERP come back as empty arrays or `null`, never invented.

Two optional add-ons go beyond a raw scrape: an AI SERP intelligence pass that returns search intent, a synthesized answer, top entities, content gaps and suggested titles, and a People Also Ask expansion that runs extra searches to fill in full answers for the PAA questions.

### Quickstart

Open the actor, paste this into the input, and press Run. It returns the first results page for each query.

```json
{
  "queries": ["best running shoes", "seguro de coche"],
  "resultsPerPage": 10,
  "maxPagesPerQuery": 1,
  "countryCode": "us",
  "languageCode": "en"
}
```

`queries` accepts plain terms, advanced operators (`site:`, `intitle:`, `OR`, quotes, `filetype:`) or full `https://www.google.com/search?q=...` URLs. Every other field is optional.

### Input reference

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `queries` | array of strings | yes | `["best running shoes"]` | One or more search terms or full Google search URLs. Each item is searched separately. Advanced operators are passed through. A single string is also accepted. |
| `resultsPerPage` | integer | no | `10` | Results per page (Google `num`, 10 to 100). One dataset item is produced per page. |
| `maxPagesPerQuery` | integer | no | `1` | Pagination depth per query (1 to 20). Each page is one billable result item. |
| `countryCode` | string | no | `us` | Two-letter country to search from (Google `gl`), for example `us`, `gb`, `es`, `de`, `br`. Also matches the connection country. |
| `languageCode` | string | no | `en` | Two-letter interface language (Google `hl`), for example `en`, `es`, `de`, `fr`, `pt`. |
| `searchLanguage` | string | no | (none) | Restrict results to a language (Google `lr=lang_XX`), for example `en`, `es`. |
| `location` | string | no | (none) | Plain-text local search location, for example `New York,New York,United States`. Encoded to a UULE parameter automatically. |
| `locationUule` | string | no | (none) | Pre-encoded Google UULE string. Overrides `location`. |
| `searchType` | enum | no | `web` | Which Google vertical to scrape: `web`, `news`, `shopping` or `images`. |
| `mobileResults` | boolean | no | `false` | Fetch the mobile version of the SERP (mobile user agent and layout). |
| `site` | string | no | (none) | Restrict every query to one domain (adds `site:<domain>`), for example `wikipedia.org`. |
| `relatedToSite` | string | no | (none) | Find pages related to a domain (adds `related:<domain>`). Useful for link prospecting. |
| `fileType` | string | no | (none) | Restrict to a file format (adds `filetype:<ext>`), for example `pdf`. |
| `wordsInTitle` | string | no | (none) | Require these words in the page title (adds `allintitle:<words>`). |
| `countryRestrict` | string | no | (none) | Restrict results by country of origin (Google `cr=countryXX`), for example `us`. Different from `countryCode`. |
| `beforeDate` | string | no | (none) | Only results on or before this date (`YYYY-MM-DD`), via Google custom date range. |
| `afterDate` | string | no | (none) | Only results on or after this date (`YYYY-MM-DD`), via Google custom date range. |
| `tbs` | string | no | (none) | Raw Google `tbs` value passed through as-is (advanced). Overrides `timeRange`, `beforeDate` and `afterDate`. |
| `saveHtml` | boolean | no | `false` | Store the raw HTML of each page to the run key-value store and return its URL in `htmlSnapshotUrl`. |
| `timeRange` | enum | no | `any time` | Restrict by recency: `any time`, `past hour`, `past day`, `past week`, `past month`, `past year`. |
| `forceExactMatch` | boolean | no | `false` | Wrap each query in quotes for exact-phrase matching. |
| `safeSearch` | boolean | no | `false` | Enable Google SafeSearch filtering. |
| `includeUnfilteredResults` | boolean | no | `false` | Include lower-quality results Google normally omits (`filter=0`). |
| `aiSerpIntelligence` | boolean | no | `false` | Paid add-on, paying accounts only. AI search intent, synthesized answer, entities, content gaps and suggested titles per page. |
| `expandPaa` | boolean | no | `false` | Paid add-on, paying accounts only. Runs extra searches to fill in full answers for the top People Also Ask questions. |

### Output reference

One dataset item per results page. Types are `string`, `integer`, `boolean`, `object`, array, or `null` when a value or block is absent.

| Field | Type | Description |
|---|---|---|
| `searchQuery` | object | What was searched: `term`, `url`, `page`, `type`, `device`, `countryCode`, `languageCode`, `locationUule`, `resultsPerPage`. |
| `resultsTotal` | integer | Approximate total results Google reports, or `null` when Google omits the count. |
| `organicResults` | array | Organic results, each with `title`, `url`, `displayedUrl`, `description`, `position`, `date`, `emphasizedKeywords`, `siteLinks`, `type`. |
| `paidResults` | array | Text ads, each with `title`, `url`, `displayedUrl`, `description`, `adPosition`, `type`. |
| `paidProducts` | array | Shopping / product ads, each with `title`, `url`, `price`, `seller`. |
| `peopleAlsoAsk` | array | People Also Ask entries, each with `question`, `answer`, `title`, `url`. `answer`/`url` fill in when the Expand PAA add-on is on. |
| `relatedQueries` | array | Related searches, each with `title` and `url`. |
| `featuredSnippet` | object | Featured snippet / answer box: `content`, `title`, `url`. `null` when absent. |
| `knowledgePanel` | object | Knowledge panel: `title`, `type`, `description`, `url`, `attributes`. `null` when absent. |
| `topStories` | array | Top stories / news cards, each with `title`, `url`, `source`, `date`. |
| `localResults` | array | Local pack results, each with `title`, `rating`, `reviews`, `address`. |
| `aiOverview` | object | AI Overview block: `content`, `sources`. `null` when not present in the HTTP response. |
| `pagination` | object | `currentPage` and `nextPageUrl`. |
| `serpFeatures` | array | Normalized list of features present, for example `organic_results`, `people_also_ask`, `featured_snippet`, `knowledge_panel`. |
| `htmlSnapshotUrl` | string | Reserved for an optional stored HTML snapshot URL. |
| `aiSerpIntelligence` | object | Add-on output: `searchIntent`, `aiAnswer`, `topEntities`, `contentGaps`, `suggestedTitles`. `null` unless the add-on ran and succeeded. |
| `paaExpandedCount` | integer | Number of People Also Ask questions expanded with full answers by the add-on. |
| `source` | string | Always `google.com`. |
| `observedAt` | string | ISO 8601 timestamp when the page was collected. |
| `error` | string | `null` on success. A soft-blocked or failed page writes a single item with a populated `error` and is not charged. |

### Example output record

The hero JSON at the top of this page is a real record from a live run for `buy iphone 15 pro` (arrays trimmed for readability). Records for question and brand queries populate `featuredSnippet`, `peopleAlsoAsk` and `knowledgePanel`; commercial queries populate `paidResults`, `paidProducts` and `localResults` when Google shows them.

### Run via API and CLI

Start a run and read the dataset. Replace `<TOKEN>` with your Apify API token.

Run synchronously and get dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~google-search-scraper-pro/run-sync-get-dataset-items?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"queries":["best running shoes"],"countryCode":"us","languageCode":"en","maxPagesPerQuery":2}'
```

Start a run asynchronously:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers_lat~google-search-scraper-pro/runs?token=<TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"queries":["seguro de coche"],"countryCode":"es","languageCode":"es"}'
```

Apify CLI:

```bash
apify call scrapers_lat/google-search-scraper-pro \
  --input '{"queries":["python tutorial"],"resultsPerPage":20}'
```

### Fetch results

Every run writes to a dataset. Fetch items as JSON, CSV or Excel by changing `format`:

```bash
## JSON
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=json"

## CSV
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?token=<TOKEN>&clean=true&format=csv"
```

`<DATASET_ID>` is returned as `defaultDatasetId` in the run object.

### Use cases

- **SEO rank tracking:** track your and competitors' positions for target keywords across countries, languages and devices.
- **SERP feature monitoring:** watch when featured snippets, knowledge panels, People Also Ask, top stories and local packs appear or change.
- **Keyword research:** mine People Also Ask, related searches and emphasized keywords to build content and PPC keyword lists.
- **Competitor analysis:** see which domains own the organic and paid results for a query, and how their titles and descriptions read.
- **AEO and AI overview tracking:** monitor which queries trigger an AI overview and what entities the SERP surfaces, and use the AI intelligence add-on to map content gaps.
- **PPC ad monitoring:** capture text ads and shopping ads competitors run on commercial queries.
- **Local SEO:** target a city with the `location` field and read the local pack for a query.
- **Brand monitoring:** search brand terms and track the knowledge panel, top stories and sentiment of the results.

### How we compare

Compared against the four most popular Google Search / SERP actors on the Apify Store at the time of writing:

- **A** = `apify/google-search-scraper` (the official actor, ~169K users, 4.6 stars)
- **B** = `scraperlink/google-search-results-serp-scraper` (~9K users, 4.9 stars, cheapest per page)
- **C** = `epctex/google-search-scraper` (~2.7K users, 3.5 stars, monthly rental)
- **D** = `apidojo/google-search-scraper` (~1K users, 3.9 stars, per-query pricing)

| Feature | This actor | A | B | C | D |
|---|:--:|:--:|:--:|:--:|:--:|
| Organic results (title, url, description, position) | Yes | Yes | Yes | Yes | Yes |
| Displayed URL and sitelinks | Yes | Yes | No | Yes | No |
| Emphasized keywords (bolded terms) | Yes | Yes | No | No | No |
| Text ads (paidResults) | Yes | Yes | No | Yes | No |
| Shopping / product ads (paidProducts) | Yes | Yes | No | No | No |
| People Also Ask | Yes | Yes | No | Yes | No |
| People Also Ask full-answer expansion | Yes | No | No | No | No |
| Related queries | Yes | Yes | No | Yes | No |
| Featured snippet / answer box | Yes | Yes | No | No | No |
| Knowledge panel | Yes | Yes | No | No | No |
| Top stories | Yes | Yes | No | No | No |
| Local pack results | Yes | Partial | No | No | No |
| AI overview (when in server HTML) | Partial | Yes (browser) | No | No | No |
| AI SERP intelligence (intent, answer, entities, gaps, titles) | Yes | Partial | No | No | No |
| Normalized serpFeatures list | Yes | No | No | No | No |
| Country and language targeting | Yes | Yes | Yes | Yes | Yes |
| Location targeting (UULE) | Yes | Yes | Yes | Yes | No |
| Auto-encode UULE from plain text location | Yes | No | No | No | No |
| Mobile results | Yes | Yes | No | No | Yes |
| News / Shopping / Images verticals | Yes | Yes | No | No | No |
| Results per page 10 to 100 | Yes | Yes | Yes | Yes | Partial |
| Pagination | Yes | Yes | Yes | Yes | Yes |
| Advanced operators (site, related, filetype, intitle) | Yes | Yes | No | No | No |
| Relative time filter | Yes | Yes | No | No | No |
| Absolute date range (before / after) | Yes | Yes | No | No | No |
| Raw tbs passthrough | Yes | No | Yes | No | No |
| Country restrict (cr) | Yes | No | Yes | No | No |
| Save HTML snapshot | Yes | Yes | No | No | No |
| Full Google search URL input | Yes | Yes | Partial | Yes | Yes |
| No proxy configuration required | Yes | Yes | Yes | No | Yes |
| No charge on failed or empty pages | Yes | Not stated | Not stated | Not stated | Not stated |

#### Why choose this scraper

- **Every SERP block in one record.** Organic, ads, shopping ads, People Also Ask, related queries, featured snippet, knowledge panel, top stories, local pack and AI overview, plus a normalized `serpFeatures` list, in the shape the leading actors use.
- **Value-adds no competitor offers together:** People Also Ask full-answer expansion, AI SERP intelligence (search intent, synthesized answer, entities, content gaps, suggested titles), emphasized keywords, auto-encoded UULE from a plain-text location, and the normalized feature list.
- **Reliability by design.** A dedicated unblocking connection returns real parsed results rather than the JavaScript shells that block naive HTTP scrapers, with automatic retries. In our tests it returned real organic results on every query.
- **Fair billing.** One price per results page, a discount ladder at higher plans, add-ons off by default and charged only on success, and no charge for soft-blocked or empty pages.

Honest notes: on raw price per page, B and D are cheaper (this actor is priced for full-feature completeness and reliability, not to be the cheapest). Actor A additionally queries several external AI engines (Gemini, ChatGPT, Perplexity, Copilot) and offers leads enrichment; those are separate products beyond core SERP parsing, and our AI SERP intelligence add-on covers the synthesized-answer use case. Google renders AI overviews client-side, so `aiOverview` is populated only when present in the server HTML.

### Billing and limits

- **Pay per results page.** You are charged one `result` event per Google results page returned, with a tiered price that decreases at higher Apify plans. See the [pricing tab](https://apify.com/scrapers_lat/google-search-scraper-pro/pricing) for the current price.
- **Actor start.** A small one-time `apify-actor-start` event is charged once per run.
- **Optional add-ons, off by default, paying accounts only.** `ai_serp_intelligence` (AI intent, synthesized answer, entities, content gaps, titles) and `expand_people_also_ask` (extra searches that fill in full PAA answers). Each is charged only when it genuinely returns data.
- **No charge on failure.** A soft-blocked or unparseable page writes a single item with an `error` field and is not charged. Empty results cost nothing.
- **Spend cap respected.** Set `maxTotalChargeUsd` on the run; once reached the actor stops emitting and charging further results.
- **Free Apify plans** are capped at 10 result pages per run and cannot use the paid add-ons. Upgrade for more.
- **AI overview note.** Google renders AI overviews client-side, so `aiOverview` is populated only when it is present in the server HTML for a query; it is `null` otherwise.

### FAQ and troubleshooting

**Do I need to configure a proxy?**
No. The actor handles the connection and anti-bot retries internally. There is no proxy input.

**A page came back with an `error` field. Why?**
Google soft-blocked or returned an unparseable page for that request after retries. Those pages are not charged. Re-run the query; transient soft blocks usually clear.

**Why is `resultsTotal` null?**
Google no longer shows the total result count on many layouts. When it is absent, the field is `null` rather than a guess.

**Why is `aiOverview` null when I see one in my browser?**
AI overviews load with JavaScript in the browser. This is an HTTP scraper, so `aiOverview` is filled only when the overview text is present in the server response. For AI intent and a synthesized answer on every query, enable the `aiSerpIntelligence` add-on.

**Can I search other countries and languages?**
Yes. Set `countryCode` and `languageCode` (for example `es` and `es`), and optionally `location` for a specific city. The connection is matched to the country.

**How do I paginate?**
Set `maxPagesPerQuery`. The actor fetches pages 1..N for each query and returns one record per page. Each page is one billable result.

**Is this an official Google tool?**
No. This actor is independent and has no affiliation with Google. It reads only publicly available search results.

### Related scrapers

- [Google Maps Scraper](https://apify.com/scrapers_lat/google-maps-scraper): Google Maps places, ratings and contact details.
- [Google News Scraper](https://apify.com/scrapers_lat/google-news-scraper): Google News articles by topic or query.
- [Google Trends Scraper](https://apify.com/scrapers_lat/google-trends-scraper): interest-over-time and related queries from Google Trends.
- [Google Play Apps Scraper](https://apify.com/scrapers_lat/google-play-apps-scraper): app listings and metadata from Google Play.
- [Google Ads Transparency Scraper](https://apify.com/scrapers_lat/google-ads-transparency-scraper): ads running in the Google Ads Transparency Center.

### More scrapers at scrapers.lat

Built and maintained by [scrapers.lat](https://scrapers.lat), where we publish scrapers for search, e-commerce, company registries, government data and finance. Browse the catalog or request a custom scraper at [scrapers.lat](https://scrapers.lat).

***

> Independent tool, not affiliated with Google. Accesses only publicly available search results. Use in accordance with Google's terms of service.

# Actor input Schema

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

One or more Google search terms, or full Google search URLs. Each item is searched separately. Advanced operators (site:, intitle:, OR, quotes, filetype:) are passed through.

## `resultsPerPage` (type: `integer`):

How many results Google returns per page (the num parameter, 10 to 100). One dataset item is produced per page.

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

How many result pages (pagination depth) to fetch for each query. Each page is one billable result item.

## `countryCode` (type: `string`):

Two-letter country to search from, e.g. us, gb, es, de, br. Sets Google's gl parameter and matches the residential proxy country.

## `languageCode` (type: `string`):

Two-letter interface language, e.g. en, es, de, fr, pt. Sets Google's hl parameter.

## `searchLanguage` (type: `string`):

Optional. Restrict results to a language, e.g. en, es. Sets Google's lr=lang\_XX parameter.

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

Optional local-search location, e.g. "New York,New York,United States". Encoded to a UULE parameter automatically. Ignored if locationUule is set.

## `locationUule` (type: `string`):

Optional pre-encoded Google UULE string for exact local search. Overrides the plain location field.

## `searchType` (type: `string`):

Which Google vertical to scrape: web, news, shopping or images.

## `mobileResults` (type: `boolean`):

Fetch the mobile version of the SERP (mobile user agent and layout) instead of desktop.

## `site` (type: `string`):

Optional. Restrict every query to one domain (adds site:<domain> to the query), e.g. wikipedia.org.

## `relatedToSite` (type: `string`):

Optional. Find pages related to a domain (adds related:<domain>), e.g. nytimes.com. Useful for link prospecting and competitor discovery.

## `fileType` (type: `string`):

Optional. Restrict to a file format (adds filetype:<ext>), e.g. pdf, doc, xls.

## `wordsInTitle` (type: `string`):

Optional. Require these words in the page title (adds allintitle:<words>).

## `countryRestrict` (type: `string`):

Optional two-letter country to restrict results by country of origin (Google cr=countryXX), e.g. us, gb. Different from countryCode, which sets where you search from.

## `beforeDate` (type: `string`):

Optional. Only results published on or before this date (YYYY-MM-DD). Uses Google's custom date range.

## `afterDate` (type: `string`):

Optional. Only results published on or after this date (YYYY-MM-DD). Uses Google's custom date range.

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

Optional advanced Google tbs value passed through as-is (e.g. qdr:w, li:1). Overrides timeRange, beforeDate and afterDate when set.

## `saveHtml` (type: `boolean`):

Store the raw HTML of each results page to the run's key-value store and return its URL in htmlSnapshotUrl. Useful for debugging or custom parsing.

## `timeRange` (type: `string`):

Restrict results by recency (Google tbs=qdr).

## `forceExactMatch` (type: `boolean`):

Wrap each query in quotes so Google matches the exact phrase.

## `safeSearch` (type: `boolean`):

Enable Google SafeSearch filtering (safe=active).

## `includeUnfilteredResults` (type: `boolean`):

Include lower-quality results Google normally omits (filter=0).

## `aiSerpIntelligence` (type: `boolean`):

Optional paid add-on (off by default, paying accounts only). For each page, an AI model reads the organic results, PAA and snippet and returns search intent, a synthesized answer, top entities, content gaps and suggested article titles. Charged only when the AI returns usable output.

## `expandPaa` (type: `boolean`):

Optional paid add-on (off by default, paying accounts only). Runs extra searches to fetch full answers for the top People Also Ask questions. Charged only when real expanded answers are returned.

## Actor input object example

```json
{
  "queries": [
    "best running shoes",
    "seguro de coche",
    "https://www.google.com/search?q=python+tutorial"
  ],
  "resultsPerPage": 10,
  "maxPagesPerQuery": 1,
  "countryCode": "us",
  "languageCode": "en",
  "searchType": "web",
  "mobileResults": false,
  "saveHtml": false,
  "timeRange": "any time",
  "forceExactMatch": false,
  "safeSearch": false,
  "includeUnfilteredResults": false,
  "aiSerpIntelligence": false,
  "expandPaa": false
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "best running shoes"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/google-search-scraper-pro").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": ["best running shoes"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/google-search-scraper-pro").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "best running shoes"
  ]
}' |
apify call scrapers_lat/google-search-scraper-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/google-search-scraper-pro"
        }
    }
}

```

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/jC6l2tTDjHxA66rO1/builds/ZgEmN6NnAR5kz8aWf/openapi.json
