# Google Search Scraper (`yasmany.casanova/google-search-scraper`) Actor

Search Google in 18 countries and get the organic results with title, link, domain and snippet, plus the AI Overview with its sources, "People also ask" questions, related searches and ads when Google shows them. Up to 100 results per query.

- **URL**: https://apify.com/yasmany.casanova/google-search-scraper.md
- **Developed by:** [Yasmany Grijalba Casanova](https://apify.com/yasmany.casanova) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 96.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 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 Search Scraper

Search **any query** on Google across 18 markets and get the results page as data: every **organic result** with title, link, domain and snippet, the **"People also ask"** questions, the **related searches** and the **AI Overview** with the sources it cites.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Markets](https://img.shields.io/badge/Markets-18%20Countries-green)](https://www.google.com)

***

> ℹ️ **Zero configuration**
> Provide a query and run it: results are ready in seconds.

***

### Quick Start

```json
{
  "query": "Logitech MX Master 3S",
  "country": "br",
  "maxResults": 10
}
```

> **Tip**: Google serves about 10 results per page and every page is one request. Keep `maxResults` at 10 for a quick first-page read, or raise it to 30 to see who ranks on the first three pages.

#### More examples

<details>
<summary>First three pages in the US</summary>

```json
{
  "query": "best wireless mouse for programmers",
  "country": "us",
  "maxResults": 30
}
```

</details>

<details>
<summary>Organic results only</summary>

```json
{
  "query": "ração para gatos castrados",
  "country": "br",
  "maxResults": 20,
  "includeQuestions": false,
  "includeRelated": false
}
```

</details>

***

### Supported Markets

| Country | `country` | Country | `country` |
|---------|-----------|---------|-----------|
| Brazil (default) | `br` | Germany | `de` |
| Portugal | `pt` | Austria | `at` |
| United States | `us` | France | `fr` |
| United Kingdom | `gb` | Spain | `es` |
| Canada | `ca` | Mexico | `mx` |
| Australia | `au` | Argentina | `ar` |
| India | `in` | Colombia | `co` |
| Ireland | `ie` | Chile | `cl` |
| Italy | `it` | Netherlands | `nl` |

Results come in the market's own language, as a user in that country would see them.

***

### Features

| Feature | Description |
|---------|-------------|
| **18 Markets** | Search as a user in Brazil, the US, the UK, Germany, France, Spain, Mexico and more |
| **Organic Results** | Title, link, domain, displayed URL, snippet, date and rich snippets (price, stock, rating) |
| **People Also Ask** | The questions Google shows for the query |
| **Related Searches** | The queries Google suggests next |
| **AI Overview** | Google's generated summary as plain text, with the sources it cites |
| **Up to 100 Results** | Page through the results, deduplicated and numbered in order |

***

### Use Cases

- **Rank Tracking**: See where each domain ranks for a query, in every market you sell in
- **Competitor Research**: Find who ranks for your product names and categories
- **Content Research**: Collect the "People also ask" questions and related searches for a topic
- **AI Visibility**: Check whether your site is cited in Google's AI Overview for the queries that matter
- **Brand Monitoring**: Run periodically to catch new results and changes in the AI Overview

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `query` | string | none | What you would type into Google (**required**) |
| `country` | string | `br` | Market to search (see the table above) |
| `maxResults` | integer | `10` | Organic results to return (1 to 100). About 10 per page, one request per page |
| `includeQuestions` | boolean | `true` | Add the "People also ask" questions as rows of type `question` |
| `includeRelated` | boolean | `true` | Add the related searches as rows of type `related_search` |

***

### Output Example

Each result is a row, typed by `record_type`, followed by a summary row with the totals and the AI Overview:

```json
[
  {
    "record_type": "organic",
    "query": "Logitech MX Master 3S",
    "country": "br",
    "page": 1,
    "position": 1,
    "title": "MX Master 3S | Mouse sem fio de alto desempenho",
    "url": "https://www.logitech.com/pt-br/shop/p/mx-master-3s",
    "domain": "www.logitech.com",
    "displayed_url": "https://www.logitech.com› shop › mx-master-3s",
    "description": "Mouse ergonômico com sensor de 8000 DPI, cliques silenciosos e rolagem MagSpeed...",
    "date": null,
    "rich_snippet": ["Em estoque"],
    "sitelinks": [],
    "scraped_at": "2026-10-21T19:40:00.000Z"
  },
  {
    "record_type": "question",
    "query": "Logitech MX Master 3S",
    "country": "br",
    "page": 1,
    "position": 1,
    "title": "Quanto tempo dura a bateria do MX Master 3S?",
    "description": null,
    "scraped_at": "2026-10-21T19:40:00.000Z"
  },
  {
    "record_type": "related_search",
    "query": "Logitech MX Master 3S",
    "country": "br",
    "page": 1,
    "position": 1,
    "title": "logitech mx master 3s preço",
    "url": null,
    "scraped_at": "2026-10-21T19:40:00.000Z"
  },
  {
    "record_type": "summary",
    "query": "Logitech MX Master 3S",
    "country": "br",
    "results_total": 164,
    "pages_fetched": 1,
    "organic_found": 8,
    "organic_returned": 8,
    "questions_found": 4,
    "related_searches_found": 8,
    "ai_overview": "O Logitech MX Master 3S é um mouse ergonômico de alto desempenho...\nPrincipais Especificações\n- Sensor: Darkfield de 200 a 8.000 DPI...",
    "ai_overview_sources": [
      { "source": "logitech.com", "url": "https://www.logitech.com/pt-br/shop/p/mx-master-3s" }
    ],
    "reference_url": "https://www.google.com/search?q=Logitech+MX+Master+3S&hl=pt&gl=br",
    "scraped_at": "2026-10-21T19:40:00.000Z"
  }
]
```

***

### Data Fields

Every row type shares the `title`, `url` and `description` columns, so the dataset reads as one table: a question is a row whose title is the question, a related search a row whose title is the suggested query.

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | `organic`, `question`, `related_search` or `summary` |
| `query` | string | The search query |
| `country` | string | Market the results were collected from |
| `page` | number | Results page the row came from |
| `position` | number | Rank of the row within its type, numbered in order across pages |
| `title` | string | Result title. For a question, the question; for a related search, the suggested query |
| `url` | string | Result link. Not every related search carries one. See the FAQ on redirect links |
| `domain` | string | Domain of the result link |
| `displayed_url` | string | The URL as Google displays it (breadcrumb form) |
| `description` | string | Result snippet. For a question, the answer when Google expands one |
| `date` | string | Date Google shows beside the result, when any |
| `rich_snippet` | array | Extra lines Google shows for the result: price, stock, rating, delivery. Organic rows only |
| `sitelinks` | array | Sitelinks under the result, when any |
| `results_total` | number | Google's own estimate of results for the query. Summary row |
| `pages_fetched` | number | Pages the run requested. Summary row |
| `organic_found` | number | Organic results found across the pages fetched, after removing repeated links. Summary row |
| `organic_returned` | number | Organic rows pushed (limited by `maxResults`). Summary row |
| `questions_found`, `related_searches_found` | number | Totals of the other row types. Summary row |
| `ai_overview` | string | Google's AI Overview as plain text, paragraphs then bullet lists. Summary row, null when Google showed none |
| `ai_overview_sources` | array | Sources the overview cites, as `{ source, url }`. Summary row |
| `reference_url` | string | Google Search URL of the first page |
| `scraped_at` | string | ISO 8601 timestamp (UTC) |

***

### Integrations

Use the **API** tab on the Actor page to get ready-to-use code examples in **Python**, **JavaScript**, and **cURL**, generated with the correct parameters for immediate integration.

***

### Example Searches

| Market | `query` |
|--------|---------|
| Brazil | `ração para gatos castrados` |
| United States | `best wireless mouse for programmers` |
| Germany | `Geschirrspüler 60 cm Testsieger` |

***

### FAQ

<details>
<summary><strong>Why did I get fewer results than maxResults?</strong></summary>

Google serves about 10 results per page, sometimes 8 or 9 when it mixes in videos, images or a map. Links that repeat across pages are kept once. When a page brings nothing new, the run stops rather than paying for empty pages, so `organic_found` can be lower than what you asked for.

</details>

<details>
<summary><strong>How many requests does a run make?</strong></summary>

One per page: `maxResults` of 1 to 10 is one request, 11 to 20 is two, and so on, up to 10 pages. The questions, related searches and AI Overview come with the same requests at no extra cost. The summary row says how many pages were fetched.

</details>

<details>
<summary><strong>Why is the AI Overview empty?</strong></summary>

Google only shows an AI Overview for some queries and markets. When it does not, `ai_overview` is null and `ai_overview_sources` is an empty list.

</details>

<details>
<summary><strong>Why is a question's answer empty?</strong></summary>

Google loads the answer only when the question is expanded on the page. The questions themselves are always collected; the answer is included when it comes with the results.

</details>

<details>
<summary><strong>Why does a url start with google.com?</strong></summary>

In some markets Google links each result through its own redirect instead of the destination. The Actor follows each organic redirect once to publish the real link, at no extra cost. When Google does not answer the redirect in time, the row keeps it: it still opens the page in a browser, and `domain` is read from the address Google displays under the title.

</details>

<details>
<summary><strong>Do the results match what I see in my browser?</strong></summary>

Closely, but not always exactly. Google personalizes results by location, history and session, and tests layouts. The run searches as an anonymous user in the selected market.

</details>

***

### Support

1. **Check the FAQ** above for common questions
2. **Test with the prefilled example** to confirm expected output
3. **Contact support** through [Apify](https://apify.com) for additional assistance

# Actor input Schema

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

What you would type into the Google search bar.

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

Google market to search. Results come in the market's own language, as a user in that country would see them.

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

Organic results to return (1-100). Google serves about 10 per page and every page is one request, so 30 results fetch 3 pages. The run stops early when Google has no more results for the query.

## `includeQuestions` (type: `boolean`):

Add the "People also ask" questions as rows of type "question". The question is in the title column and, when Google expands one, its answer in the description column.

## `includeRelated` (type: `boolean`):

Add the related searches Google suggests as rows of type "related_search", with the suggested query in the title column.

## Actor input object example

```json
{
  "query": "Logitech MX Master 3S",
  "country": "br",
  "maxResults": 10,
  "includeQuestions": true,
  "includeRelated": true
}
```

# Actor output Schema

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

One row per result, typed by record_type: organic (title, url, domain, description, snippet), question ("People also ask", the question in title) and related_search (the suggested query in title). One summary row carries the totals, the pages fetched and the AI Overview text with its sources, and holds no result columns, so counting the result rows needs no filtering.

# 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": "Logitech MX Master 3S",
    "country": "br"
};

// Run the Actor and wait for it to finish
const run = await client.actor("yasmany.casanova/google-search-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": "Logitech MX Master 3S",
    "country": "br",
}

# Run the Actor and wait for it to finish
run = client.actor("yasmany.casanova/google-search-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 '{
  "query": "Logitech MX Master 3S",
  "country": "br"
}' |
apify call yasmany.casanova/google-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yasmany.casanova/google-search-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/HF10vu66gEuc20mX0/builds/Wpgm2IpkzmTM7m5t5/openapi.json
