# Google Search Scraper (`piotrv1001/google-search-scraper`) Actor

Scrape Google search results like a SERP API: organic results with absolute position, title, URL, snippet and date, plus People also ask and related searches. Any country and language, site: operators, many pages. Rank tracker and SEO data.

- **URL**: https://apify.com/piotrv1001/google-search-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** SEO tools, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 search 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

Scrape **Google search results** for any keyword and export them as JSON, CSV or Excel. The **Google Search Scraper** works like a simple **SERP API**: for each query it saves every organic result with its **position**, title, URL, displayed URL, snippet and date, plus the **People also ask** questions and **related searches** Google shows. Pick the country and language, use Google operators like `site:` or `"exact phrase"`, and scrape several pages per query. Use it as a **rank tracker** or **keyword rank checker**, for SEO and competitor research, content ideas, lead lists or AI training data. No Google account or API key needed.

### ✨ Features

- 🔎 **Many queries per run**: one keyword per line, each scraped separately.
- 📈 **Absolute positions**: `position` counts across pages (page 2 starts after page 1), so you can check Google rankings for your pages and your competitors'.
- 🌍 **Any country and language**: results ranked for the country you choose (`us`, `gb`, `de`, `in`...) in the language you choose.
- 🧩 **Google operators work**: `site:`, `intitle:`, `"exact phrase"`, `-exclude`, `OR`, `filetype:` and the rest.
- 🔗 **Paste a Google link**: a search link keeps its filters (e.g. past week) and starts at its page.
- ❓ **People also ask and related searches**: saved with the first result of each page, ready for keyword research.
- 🧹 **No duplicates**: a URL Google repeats on a later page is saved and charged once per query.

### 🛠️ How It Works

1. **Enter search queries**: keywords, operators or Google search links, one per line.
2. **Pick a country, a language and the number of pages** per query.
3. **Run the Scraper**: download the results as JSON, CSV or Excel, or call it through the API like any SERP API.

### ⚙️ Input

| Field               | What it does                                                                                                   |
| ------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Search queries**  | What to search, one per line. Plain keywords, Google operators or a pasted Google search link. Default `web scraping`. |
| **Country**         | Two-letter country code the results are ranked for. Default `us`.                                             |
| **Language**        | Google interface language, e.g. `en`, `de`, `pt-BR`. Default `en`.                                           |
| **Pages per query** | Result pages per query (up to 10 organic results each). Default 2.                                            |

```json
{
    "queries": ["serp api", "site:github.com web scraper", "best running shoes"],
    "countryCode": "us",
    "languageCode": "en",
    "maxPagesPerQuery": 3
}
```

#### How many results per query?

Each Google page has **up to 10 organic results**. Page 1 often has 7–9, because videos, maps and other boxes take space. Google stops listing results after roughly **10–15 pages** for most queries (about 90–130 results; in tests "web scraping" ended at page 13 and "crawlee apify" at page 10). When a query runs out before your page limit, the run's status message says on which page it ended. Ads, maps, image and shopping boxes are not saved.

### 🔍 Use cases

- **Rank tracker / keyword position checker**: schedule a daily run for your keywords and track where your pages rank in each country.
- **SERP checker for SEO audits**: see who ranks for a keyword, their titles and snippets, and which result types Google prefers.
- **Google People also ask research**: collect the questions people ask around a topic for FAQ pages and content plans.
- **Lead lists**: `site:` and `intitle:` searches turn Google into a list of companies, directories or profiles.
- **AI and RAG pipelines**: feed fresh search results and URLs to an LLM agent.

### 💰 Pricing

Pay only for the results you get. No monthly rental.

| Event              | Price                                    | What you get                                                |
| ------------------ | ---------------------------------------- | ----------------------------------------------------------- |
| **Search result**  | $0.0008 per result ($0.80 per 1,000)     | One organic result with all fields below                    |
| **Actor start**    | $0.00005 per run                         | Charged once when the run starts.                           |

Examples: 1 page (about 9 results) ≈ $0.0072 · 1,000 results = $0.80 · 10,000 results = $8.00. People also ask and related searches are included at no extra cost. Pages that return no results cost nothing.

### 📊 Sample Output Data

```json
{
    "id": "42513cd0c66a661e4870",
    "query": "web scraping",
    "page": 1,
    "position": 1,
    "title": "Web scraping",
    "displayedUrl": "https://en.wikipedia.org › wiki › Web_scraping",
    "siteName": "Wikipedia",
    "snippet": "Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites.",
    "date": null,
    "url": "https://en.wikipedia.org/wiki/Web_scraping",
    "countryCode": "us",
    "languageCode": "en",
    "peopleAlsoAsk": ["Is web scraping illegal?", "Can ChatGPT do web scraping?", "What actually is web scraping?", "Is web scraping free?"],
    "relatedSearches": ["Web scraping tools", "Web scraping python", "Web scraping extension", "Web scraping project", "Web scraping AI", "Web scraping free", "Is web scraping legal", "Web scraping online"],
    "scrapedAt": "2026-10-21T10:27:55.792Z"
}
```

- `date` is the date Google shows next to the result, as shown ("Mar 5, 2025", "3 days ago", "16.01.2026"), or `null`.
- Video and forum results have no displayed URL; they carry `details` instead, e.g. `"6.3K+ views · 1 year ago"`.
- `peopleAlsoAsk` and `relatedSearches` are on the first result of each page that shows them (usually page 1).

### ❓ FAQ

**Is this a Google search API?** It works like one: send queries through the Apify API and get structured JSON back, without a Google API key or the Custom Search quota.

**Can I check Google rankings for my site?** Yes. Run your keywords with enough pages and filter the rows by your domain; `position` is the absolute rank across pages.

**Can I get results from another country?** Yes. Set "Country" (e.g. `gb`, `de`, `in`) and "Language". Local results inside a country can differ by city; results are not tied to one city.

**Does it scrape ads, maps or images?** No, this Actor saves organic web results plus People also ask and related searches.

**Can I use a date filter?** Yes. Search on Google, pick "Tools → Past week" (or any filter), and paste that link as a query.

**Why fewer results than pages × 10?** Page 1 often has 7–9 organic results, and Google ends the list after 10–15 pages for most queries. You pay only for results saved.

# Actor input Schema

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

What to search on Google, one query per line. Operators work as on Google (site:, intitle:, "exact phrase", -exclude, OR). You can also paste a Google search link: its filters (e.g. past week) and page are kept.

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

Two-letter country code to search from, e.g. us, gb, de, fr, in. Google ranks results for this country.

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

Language of the Google interface, e.g. en, de, es, pt-BR. Affects dates, related searches and which pages rank.

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

How many Google result pages to scrape for each query. A page holds up to 10 organic results (often 7-9 on page 1, where videos and other boxes take space). Google stops listing results after roughly 10-15 pages for most queries.

## Actor input object example

```json
{
  "queries": [
    "web scraping",
    "site:github.com crawlee",
    "best running shoes"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "maxPagesPerQuery": 2
}
```

# 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": [
        "web scraping"
    ],
    "countryCode": "us",
    "languageCode": "en",
    "maxPagesPerQuery": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/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 = {
    "queries": ["web scraping"],
    "countryCode": "us",
    "languageCode": "en",
    "maxPagesPerQuery": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/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 '{
  "queries": [
    "web scraping"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "maxPagesPerQuery": 2
}' |
apify call piotrv1001/google-search-scraper --silent --output-dataset

```

## MCP server setup

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