# Google Search Results Scraper (`data_minds/google-search-results-scraper`) Actor

Scrape Google Search for any keyword or URL: organic results, AI Overview, People Also Ask, related searches, ads, videos and knowledge panel. No login or API key. Country, language and date filters. Bulk input, auto proxy fallback. Export JSON, CSV or Excel.

- **URL**: https://apify.com/data_minds/google-search-results-scraper.md
- **Developed by:** [Data Minds](https://apify.com/data_minds) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 results

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

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 Results Scraper

Google Search Results Scraper turns any list of keywords or Google search URLs into structured JSON. For every search you get one record with the organic results, the AI Overview, People Also Ask questions and answers, related searches, ads, videos, the knowledge panel and the most frequent domains. No Google account, cookies or API key are needed, and every record is ready to pass to an LLM, a database or a spreadsheet.

### Why choose this Actor?

- **One record, every section.** Organic results, AI Overview, People Also Ask, related searches, ads, videos and knowledge panel arrive together. Ads, related searches and People Also Ask answers are read for the first 10 searches of a run; later searches still get all other sections.
- **Bulk input.** Paste hundreds of keywords or Google search URLs. The result limit is shared fairly across all searches.
- **Real destination links.** Results, sitelinks and videos carry the final website URL, not an intermediate link.
- **Built to keep running.** The Actor starts without a proxy, moves to a datacenter proxy if Google rejects the request, then to a residential proxy, and stays on it. Every switch is written to the run log.
- **Live output.** Each search is saved to the dataset as soon as it is finished, and the run log shows every result as it is collected.
- **Section tables.** The Output tab has one table per section: organic results, AI Overview, People Also Ask, related searches, ads, videos, knowledge panel and top domains.

### Key features

- Keywords and full Google search URLs in the same list
- Country and language targeting with 60+ countries and 40+ languages
- Time filters: past hour, day, week, month, year, or a custom date range
- Date widening: when a search runs out of results, older date windows are searched to reach your result limit
- Rating stars, sitelinks, dates and result type for every organic result
- Marks which organic results are cited inside the AI Overview
- Export to JSON, CSV, Excel, XML or HTML, or read through the API

### Input

| Field | Type | What it does |
|---|---|---|
| `queries` | list (required) | Search terms or Google search URLs, one per line. Bulk supported. |
| `maxItems` | integer | Total organic results for the whole run, shared across searches. 0 means every result Google serves. Default 20. |
| `maxPagesPerQuery` | integer | Upper limit of result pages per search. Default 10. |
| `countryCode` | select | Country the results are localized for. Default `us`. |
| `languageCode` | select | Result language. Default `en`. |
| `quickDateRange` | select | `any`, `1h`, `24h`, `7d`, `2w`, `1m`, `1y`. |
| `afterDate` / `beforeDate` | date | Custom range in `YYYY-MM-DD`. Used when the quick range is `any`. |
| `includeExtraSections` | boolean | Also collect ads, related searches and People Also Ask answers. Default on. |
| `resolveLinks` | boolean | Return final website URLs. Default on. |
| `expandByDate` | boolean | Search older date windows when results run out. Default on. |
| `proxyConfiguration` | object | Starts without a proxy and falls back automatically. Pick Residential to start on it. |

Example input:

```json
{
  "queries": ["best running shoes", "https://www.google.com/search?q=what+is+a+vpn&hl=en"],
  "maxItems": 40,
  "countryCode": "us",
  "languageCode": "en",
  "quickDateRange": "any",
  "includeExtraSections": true
}
```

A Google URL keeps its own `q`, `hl`, `gl` and `tbs` values. News, images, shopping and AI-mode URLs are scraped as a plain web search.

### Output

One dataset record per search. Example from a real run (shortened):

```json
{
  "searchQuery": {
    "term": "cheap flights",
    "countryCode": "gb",
    "languageCode": "en",
    "timeRange": "any",
    "pagesFetched": 2,
    "url": "https://www.google.com/search?q=cheap+flights&hl=en&gl=gb&pws=0&lr=lang_en",
    "browserPassDone": true
  },
  "organicResultsCount": 12,
  "serpFeatures": ["knowledge_panel", "ratings"],
  "organicResults": [
    {
      "position": 1,
      "page": 1,
      "title": "Cheap flights from United Kingdom - Airline tickets ...",
      "url": "https://www.esky.eu/flights/co/gb/0/0/united-kingdom",
      "displayedUrl": "https://www.esky.eu › Flights › Flights United Kingdom",
      "domain": "esky.eu",
      "siteName": "eSky.eu",
      "type": "web",
      "description": "Special flight deals from United Kingdom Birmingham - Barcelona 5 days. ...",
      "date": null,
      "dateISO": null,
      "rating": null,
      "emphasizedKeywords": ["Special flight deals from United Kingdom Birmingham - Barcelona 5 days"],
      "siteLinks": [],
      "citedInAiOverview": false
    }
  ],
  "aiOverview": null,
  "peopleAlsoAsk": [],
  "relatedSearches": [],
  "ads": [],
  "videos": [],
  "knowledgePanel": { "title": "Cheapflights", "type": "Website", "description": "..." },
  "topDomains": [{ "domain": "facebook.com", "count": 2 }],
  "endedBecause": "max_items reached"
}
```

| Section | Fields |
|---|---|
| `searchQuery` | `term`, `countryCode`, `languageCode`, `timeRange`, `pagesFetched`, `url`, `browserPassDone` |
| `organicResults` | `position`, `page`, `timeWindow`, `title`, `url`, `displayedUrl`, `domain`, `siteName`, `type`, `description`, `date`, `dateISO`, `datePrecision`, `resultInfo`, `duration`, `rating`, `emphasizedKeywords`, `siteLinks`, `citedInAiOverview` |
| `aiOverview` | `label`, `text`, `sources` (title, url, domain) |
| `peopleAlsoAsk` | `question`, and `answer`, `answerType`, `sources` when the answer could be read |
| `relatedSearches` | `query` |
| `ads` | `position`, `placement`, `title`, `url`, `advertiserUrl`, `domain`, `description` |
| `videos` | `title`, `channel`, `platform`, `duration`, `url` |
| `knowledgePanel` | `title`, `type`, `description` |
| `topDomains` | `domain`, `count` |
| `endedBecause` | why collection for this search stopped |

Sections Google does not show for a search stay empty (`null` or an empty list).

### 🚀 How to use (Apify Console)

1. Log in at [console.apify.com](https://console.apify.com) and open **Actors**.
2. Find **Google Search Results Scraper** and open it.
3. Add your keywords or Google URLs, then set the result limit, country and language.
4. Click **Start**.
5. Watch the run log: it lists every result as it is collected and every proxy change.
6. Open the **Output** tab when the run completes and switch between the section tables.
7. Export to JSON, CSV or Excel.

### 🤖 Use via API / MCP

Start a run and wait for the records:

```bash
curl -X POST "https://api.apify.com/v2/actors/ACTOR_ID/run-sync-get-dataset-items" \
     -H "Authorization: Bearer $APIFY_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"queries":["best running shoes"],"maxItems":20}'
```

Replace ACTOR_ID with the Actor's ID from its Console page. Synchronous calls stop waiting after 300 seconds, so use the asynchronous `/runs` endpoint for large jobs. To call the Actor from an AI agent, connect the Apify MCP server (`https://mcp.apify.com`) and let the agent search for and call this Actor.

### Best use cases

- SEO rank tracking and SERP feature monitoring
- Competitor and ad research
- Market research and trend tracking with time filters
- Feeding fresh search context to LLM and RAG pipelines
- Building question lists from People Also Ask and related searches

### Pricing

The Actor uses pay per event. One `main_result` event is charged for each search record saved. A search that returns no results is saved so you can see why, and is not charged. Free plan users get up to 10 results per run; paid plans have no limit.

### Frequently asked questions

**How many results can I get for one search?**
Google serves about 65 distinct results per search. With the default settings the Actor searches older date windows to get closer to your limit. Add more searches or time ranges to go further.

**Why are the ads, related searches or answers empty?**
Google does not show them for every search. They are also skipped when Google challenges the connection while they are being read. The log says so, and the organic results are still saved.

**What happens when Google blocks the connection?**
The Actor switches from no proxy to a datacenter proxy, then to a residential proxy, and stays on it. If a residential connection is blocked it retries up to 3 more times with a new IP. If everything is blocked the run ends with a clear message and keeps what it collected.

**Can I scrape news, images or shopping results?**
No. Those Google URLs are treated as a plain web search.

**Which dates does the time filter use?**
The filter is applied by Google. The Actor warns in the log when more than half of the dated results are older than the range you asked for.

**Is it legal to scrape Google Search?**
The Actor reads public results that any visitor can see. You are responsible for using the data in line with the law and Google's terms.

### Support and feedback

Found a problem or need another field? Open an issue from the Actor page in Apify Console and include the run link.

# Actor input Schema

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

One search term or one Google search URL (https://www.google.com/search?q=...) per line. Add as many as you like. Each one returns its own record.

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

Total number of organic results for the whole run, shared fairly between all searches. 0 means every result Google serves. Free plan users get up to 10 results per run; paid plans have no limit.

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

Upper limit of Google result pages fetched for one search. Google rarely serves more than about 10 pages.

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

Country the results are localized for.

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

Interface and result language.

## `quickDateRange` (type: `string`):

Only results from this period. Choose "Any time" to use the After and Before dates below instead.

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

Only results published on or after this date (YYYY-MM-DD). Used when the quick date range is "Any time".

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

Only results published on or before this date (YYYY-MM-DD). Used when the quick date range is "Any time".

## `includeExtraSections` (type: `boolean`):

Also collect ads, related searches and People Also Ask answers. Adds a few seconds per search. AI Overview, videos and knowledge panel are always included when Google shows them.

## `resolveLinks` (type: `boolean`):

Return the final destination URL of every result, sitelink and video rather than an intermediate link.

## `expandByDate` (type: `boolean`):

Google serves about 65 distinct results per search. When Max results is higher, older date windows are searched to reach it. Only used when no date filter is set.

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

Starts without a proxy. If Google rejects the request, the Actor switches to a datacenter proxy, then to a residential proxy, and stays on it. Choose Residential here to start on it right away.

## Actor input object example

```json
{
  "queries": [
    "best running shoes"
  ],
  "maxItems": 20,
  "maxPagesPerQuery": 10,
  "countryCode": "us",
  "languageCode": "en",
  "quickDateRange": "any",
  "includeExtraSections": true,
  "resolveLinks": true,
  "expandByDate": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every organic result as its own row.

## `overview` (type: `string`):

One row per search with counts and features.

## `aiOverview` (type: `string`):

AI answer and cited sources.

## `peopleAlsoAsk` (type: `string`):

Questions with answers and sources.

## `relatedSearches` (type: `string`):

Related search suggestions.

## `ads` (type: `string`):

Sponsored results.

## `videos` (type: `string`):

Video results.

## `knowledgePanel` (type: `string`):

Knowledge panel summary.

## `topDomains` (type: `string`):

Most frequent domains.

## `allData` (type: `string`):

Full records as 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": [
        "best running shoes"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("data_minds/google-search-results-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": ["best running shoes"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("data_minds/google-search-results-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": [
    "best running shoes"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call data_minds/google-search-results-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data_minds/google-search-results-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/wJQwlnsiq5VWOYO4M/builds/3C8VKCdxIuiCHDPfQ/openapi.json
