# ✨ Google Search Results Scraper (`damilo/google-search-apify`) Actor

⚡️ Lightning-fast Google Search Scraper. Grab pinpoint-accurate, geo-targeted SERP data with query, lang, country, date, and pagination controls. Ideal for SEO, market research & analytics. Delivers clean JSON for instant integration.

- **URL**: https://apify.com/damilo/google-search-apify.md
- **Developed by:** [Imad](https://apify.com/damilo) (community)
- **Categories:** SEO tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 643 total users, 4 monthly users, 100.0% runs succeeded, 12 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.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

✅ If this actor saved you time, a ⭐⭐⭐⭐⭐ review helps me keep improving!

Looking for the **fastest and most reliable Google search scraper**? You've found it.

This scraper makes it simple to extract Google Search results at scale through a hosted SERP API — no browser and no proxies to manage. Whether you're conducting SEO research, competitive analysis, content aggregation, or data-driven reporting, you get localized results in seconds.

No more dealing with flaky scripts or unreliable scrapers — this is your go-to solution for efficient, accurate, and localized Google scraping.

***

### Table of Contents

1. [Features](#features)
2. [Input Parameters](#input-parameters)
3. [Example Input](#example-input)
4. [Output](#output)
5. [Limitations & Notes](#limitations--notes)
6. [Support](#support)

***

### Features

- 🚀 **Fast**: One API call per results page; most runs finish in seconds.
- ✅ **Reliable**: Transient upstream errors are retried automatically, and the run fails with a clear message (instead of returning an empty dataset) if the upstream service rejects a request.
- 🌍 **Geo & Language Targeting**: Customize results with country and language codes.
- 📦 **Structured Output**: Returns clean, JSON-formatted data for easy integration.
- 🔍 **Perfect for SEO**: Ideal for SERP monitoring, backlink analysis, and trend research.

***

### Input Parameters

| Key          | Type     | Required | Default   | Description                                                                          |
| ------------ | -------- | -------- | --------- | ------------------------------------------------------------------------------------ |
| `query`      | string   | No       | –         | A single search query. Use this **or** `queries`.                                    |
| `queries`    | string\[] | No       | –         | An array of search queries. Each query runs as a separate Google search.              |
| `country`    | string   | No       | `us`      | Country code to localize results (e.g., `us`, `gb`, `fr`, etc.).                     |
| `language`   | string   | No       | `en`      | The language to search in (e.g., `en`, `fr`, etc.).                                  |
| `num`        | integer  | No       | `10`      | Number of results per page.                                                          |
| `max_pages`  | integer  | No       | `1`       | Number of pages to scrape per query. Pagination stops early when a page has no results. |
| `date_range` | string   | No       | `anytime` | Filter results by date (past hour, day, week, etc.).                                 |

> **Note:** When `queries` is provided, it takes priority over `query`. If neither is provided, the run fails with a clear message.

***

### Example Input

**Single query** (original behavior, still fully supported):

```json
{
  "query": "latest AI tools 2025",
  "country": "us",
  "language": "en",
  "num": "10",
  "max_pages": 10,
  "date_range": "anytime"
}
```

**Multiple queries:**

```json
{
  "queries": ["latest AI tools 2025", "best programming languages 2025", "top startups to watch"],
  "country": "us",
  "language": "en",
  "num": "10",
  "max_pages": 3,
  "date_range": "anytime"
}
```

***

### Output

The scraper returns an array of results in the following format. Each result includes the `query` that produced it, making it easy to group results when using multiple queries.

```json
[
  {
    "query": "best running shoes",
    "title": "The 15 Best Running Shoes of 2026",
    "link": "https://www.runnersworld.com/gear/a19663621/best-running-shoes/",
    "snippet": "For new runners we recommend a shoe like the Brooks Ghost or Nike Pegasus as a starting point. These shoes are moderately cushioned and offer ...",
    "position": 1,
    "date": "Aug 3, 2026"
  },
  ...
]
```

`position` is the organic rank on the page (1 = first result), `date` is the publish date Google shows for the result (or `null`), and `sitelinks` — an array of `{ "title", "link" }` objects — is included when Google displays sitelinks under a result.

***

### Limitations & Notes

- No need for proxies.
- ⚠️ **Ethical Usage Only**: Please scrape responsibly and comply with Google's Terms of Service.
- 🧩 Designed for use with Apify platform

***

### Support

Need help or want to contribute?

- Join the Apify developer community for help and insights.
- Reach out through the Apify platform for custom requests or support.

***

### Why Choose This Scraper?

This tool was built with precision and performance in mind. It handles large-scale scraping jobs with ease and was crafted to meet the expectations of developers, marketers, and analysts alike. It’s not just another scraper — it’s a professional-grade **Google search results API**.

> Try it today and see why it's becoming the top choice for modern data teams.

***

Happy scraping!

# Actor input Schema

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

A single query to search for. If you need multiple queries, use the 'queries' field instead.

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

List of queries to search for in a single run. If provided, this takes priority over the single 'query' field.

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

The country to search in.

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

The language to search in.

## `num` (type: `string`):

Number of results per page to scrape.

## `max_pages` (type: `integer`):

The maximum number of pages to scrape.

## `date_range` (type: `string`):

The date range to search for.

## Actor input object example

```json
{
  "query": "best running shoes",
  "queries": [],
  "country": "us",
  "language": "en",
  "num": "10",
  "max_pages": 1,
  "date_range": "anytime"
}
```

# 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 running shoes",
    "country": "us",
    "language": "en",
    "num": "10",
    "max_pages": 1,
    "date_range": "anytime"
};

// Run the Actor and wait for it to finish
const run = await client.actor("damilo/google-search-apify").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 running shoes",
    "country": "us",
    "language": "en",
    "num": "10",
    "max_pages": 1,
    "date_range": "anytime",
}

# Run the Actor and wait for it to finish
run = client.actor("damilo/google-search-apify").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": "best running shoes",
  "country": "us",
  "language": "en",
  "num": "10",
  "max_pages": 1,
  "date_range": "anytime"
}' |
apify call damilo/google-search-apify --silent --output-dataset

```

## MCP server setup

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

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/NMg8N0mfwrLhOLmlW/builds/jxWpIDcB46W1npqRc/openapi.json
