# Google Search Scraper ($0.15 per 1000 results) (`igolaizola/google-search-scraper`) Actor

$0.15 per 1000 results 💸 Fast & Low Cost Google Search scraper that returns clean, structured SERP data. Get position, title, URL and snippet. Control region, language and domain, with built-in Apify proxy support for reliable, geo-accurate results.

- **URL**: https://apify.com/igolaizola/google-search-scraper.md
- **Developed by:** [Iñigo Garcia Olaizola](https://apify.com/igolaizola) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 242 total users, 38 monthly users, 99.8% runs succeeded, 2 bookmarks
- **User rating**: 4.30 out of 5 stars

## Pricing

from $0.13 / 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.
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 Scraper - SERP

Scrape unlimited Google Search Results for only $0.15 per 1000 results 💸. Try it free!

### 🔎 What does Google Search Scraper do?

Google Search Scraper fetches clean, structured results from Google's Search Result Pages (SERPs) at lightning speed ⚡️ and low cost 💸.
It's ideal for keyword research, competitive intelligence, link prospecting, and any workflow where you need fast, lightweight SERP data.

It extracts, per result:

- **Position** – Ranking order on the page
- **Title** – The result's headline
- **URL** – Final destination link
- **Snippet** – Descriptive text shown by Google

> ⚡️ Uses custom techniques to make it fast and resilient at a very affordable price.

### 💡 Why scrape Google?

- **SEO & Keyword Research:** Track which pages rank for your queries and how snippets evolve.
- **Market & Competitor Intel:** See who's winning SERPs across regions and languages.
- **Lead Generation:** Harvest relevant URLs for outreach.
- **Monitoring:** Keep an eye on branded queries and content changes.

### 🚀 How to use it

1. **Configure your input**
   - Set your **query** (e.g., `site:apify.com pricing`)
   - Choose **country** and **language** codes (optional)
   - Optionally choose a separate **proxyCountry** for the proxy exit location
   - The selected CSE/DDG/Startpage transports use `country` and do not query the custom Google domain
   - Optionally set a **timeRange** filter (e.g., `day` or `week`)
   - Set **maxItems** to limit the number of results

2. **Run the actor**
   Click **Run** in Apify Console, or use the API / SDK.

3. **Get your data**
   Results are saved to the **Dataset** as JSON/CSV/Excel/Parquet.

### 📝 Input parameters

| Parameter      | Type    | Required | Description                                                                                         |
| -------------- | ------- | -------- | --------------------------------------------------------------------------------------------------- |
| `maxItems`     | Integer | Yes      | Maximum number of results to scrape. Minimum `10`. Default `10`.                                    |
| `query`        | String  | Yes      | Search query (e.g., `apify`, `site:example.com blog`).                                              |
| `country`      | String  | No       | 2-letter country code for Google search targeting, e.g., `us`, `uk`, `de`. Default `us`.            |
| `proxyCountry` | String  | No       | Optional 2-letter country code for the proxy exit location; defaults to `country` when omitted.     |
| `language`     | String  | No       | 2-letter language code for interface language, e.g., `en`, `es`, `fr`. Default `en`.                |
| `domain`       | String  | No       | Compatibility field; used only by explicit legacy light-HTML mode. Default `google.com`.            |
| `timeRange`    | String  | No       | Optional time filter. Supports `hour`, `day`, `week`, `month`, or `year`. Leave empty for any time. |

**Example input:**

```json
{
  "maxItems": 10,
  "query": "apify",
  "country": "us",
  "proxyCountry": "us",
  "language": "en",
  "domain": "google.com",
  "timeRange": "day"
}
```

### 📊 Output

**Example output snippet:**

```json
[
  {
    "position": 1,
    "title": "Apify",
    "url": "https://apify.com/",
    "snippet": "Cloud platform for web scraping, browser automation, AI agents, and data for AI. Use 7000+ ready-made tools, code templates, or order a custom solution.Pricing - Apify Documentation - Apify Console - Apify Proxy"
  },
  {
    "position": 2,
    "title": "Apify Console",
    "url": "https://console.apify.com/",
    "snippet": "Manage the Apify platform and your account.Apify API - Apify pricing - Apify Documentation - Apify Status"
  },
  {
    "position": 3,
    "title": "Apify Store - 7000+ web scraping and automation tools",
    "url": "https://apify.com/store",
    "snippet": "Ready-to-use web scraping tools for popular websites and automation software for any use case. Plus marketplace for developers to earn from coding.Apollo scraper - All Actors - LinkedIn Jobs Scraper - AI agents"
  }
]
```

**Dataset schema (per item):**

- `position` *(number)*
- `title` *(string)*
- `url` *(string)*
- `snippet` *(string)*

### 🧭 Tips for accurate geo & language targeting

- **`country` vs `proxyCountry` vs `language`:**
  `country` selects the Google search market, while `proxyCountry` requests an exit IP in a particular country.
  `language` sets the UI language and influences snippet language.

- **Matching locations:**
  When `proxyCountry` is empty, it automatically follows `country`. Set `proxyCountry` explicitly only when you intentionally want the network location to differ.

- **Domain choice:**
  The default CSE/DDG/Startpage transports do not use the custom Google domain. It remains accepted for compatibility and is used only by the explicit legacy light-HTML mode.

### ⚙️ Best practices

- **Pagination & limits:** Google returns up to 10 organic items per page. Set `maxItems` to the total you need (e.g., 50 grabs 5 pages).
- **Respectful usage:** Keep request volumes reasonable to avoid rate-limiting.
- **Consistency:** For reproducible results, keep `country`, `proxyCountry`, and `language` stable across runs. The default transport ignores `domain`.

### ❓ FAQ

**Q: Do I need to set both `country` and `domain`?**
A: No. `country` is the regional search setting used by the default transports; `domain` is retained for compatibility and is only used by the explicit legacy light-HTML mode.

**Q: Do I need to set `proxyCountry`?**
A: No. When omitted, the proxy exit country follows `country`. Set it when you need the proxy exit IP to differ from the search country.

**Q: Why are some snippets truncated or duplicated?**
A: Google often compacts text or includes sitelinks. The scraper returns the visible snippet string; formatting can vary per query/region.

**Q: Can I get ads, knowledge panels, People also ask, etc.?**
A: This actor focuses on organic results (position, title, url, snippet) for speed and reliability. If you need more SERP entities, reach out to discuss an extended version.

### ⚖️ Legal considerations

- **Follow Google's Terms of Service and robots policies.**
- **Avoid excessive traffic** that may burden services.
- **Handle personal data responsibly** and comply with regulations (e.g., GDPR).
- When unsure, **consult legal counsel**.

> Learn more: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### 🧩 Support

Have a feature request (e.g., images, PAAs, ads)? **Open an issue or contact the developer** at https://igolaizola.com/#contact or https://t.me/igolaizola

# Actor input Schema

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

Maximum number of results to scrape

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

Query to search

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

Country code to use for the search (e.g., 'us' for United States, 'uk' for United Kingdom)

## `proxyCountry` (type: `string`):

Optional country code for the proxy location; defaults to country when omitted (e.g., 'us' for United States, 'gb' for United Kingdom)

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

Language code to use for the search (e.g., 'en' for English, 'es' for Spanish)

## `domain` (type: `string`):

Compatibility field for the explicit legacy light-HTML mode; the default CSE/DDG/Startpage transports ignore it (e.g., google.com, google.co.uk)

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

Optional time filter for search results.

## Actor input object example

```json
{
  "maxItems": 100,
  "query": "apify",
  "country": "us",
  "proxyCountry": "",
  "language": "en",
  "domain": "google.com",
  "timeRange": ""
}
```

# 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 = {
    "query": "apify"
};

// Run the Actor and wait for it to finish
const run = await client.actor("igolaizola/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": "apify" }

# Run the Actor and wait for it to finish
run = client.actor("igolaizola/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": "apify"
}' |
apify call igolaizola/google-search-scraper --silent --output-dataset

```

## MCP server setup

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