# Google Search Results Scraper · SERP API $0.45/1k (`alfalfa/google-serp-scraper`) Actor

Google search results scraper and Google SERP API replacement: organic results with resolved URLs, ads, shopping ads, People Also Ask, related searches, pagination, any country and language. One record per result page, $0.45 per 1,000 pages, final price, no start fee.

- **URL**: https://apify.com/alfalfa/google-serp-scraper.md
- **Developed by:** [Alfalfa](https://apify.com/alfalfa) (community)
- **Categories:** SEO tools, Lead generation, Agents
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 result pages

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

Scrape Google search result pages by keyword or URL and get clean JSON: organic results with their real destination
URLs, text ads, shopping ads, People Also Ask questions, related searches and pagination, for any country and language.
A Google SERP API replacement priced per result page, with no start fee.

### What you get

One record per result page (10 results per page), the same field names as the official Google Search Results Scraper:

| Field | Content |
|---|---|
| `searchQuery` | the query, page number, country, language, device, and the date filter when one is set |
| `organicResults` | `title`, `url` (resolved destination), `displayedUrl`, `description`, `siteName`, `date`, `emphasizedKeywords`, `siteLinks`, `type` (`organic` or `video`), `position` |
| `paidResults` | text ads with title, destination URL, displayed URL and description |
| `paidProducts` | shopping ads with title, price and merchant |
| `peopleAlsoAsk` | the questions Google shows for the query |
| `relatedQueries` | related searches with their Google URLs |
| `hasNextPage` | whether another page exists |

Results are the mobile result pages (`searchQuery.device` = `MOBILE`), which is what most Google users see today.

### How to use it

1. Enter one search query per line (or full Google search URLs).
2. Optionally set the country the results should be localized to (`us`, `gb`, `de`, `cz` ...), the language, how many pages per query you want, and a time range or custom date range.
3. Run. Download the dataset as JSON, CSV or Excel, or read it over the API.

Google hides the destination of every result behind a redirect link. The Actor resolves those links so `url` is the
real page address; switch **Resolve result URLs** off if you only need titles and descriptions.

### Filter by date

Set **Time range** to get only results from the past hour, 24 hours, week, month or year, the same filter as Google's
*Tools > Any time* menu. For a fixed period set **Date from** and **Date to** (`YYYY-MM-DD`; one of them is enough for
an open-ended range); a custom range replaces the time range. The filter applies to every page of every query, and
each record carries it in `searchQuery.timeRange` or `searchQuery.dateFrom` / `searchQuery.dateTo`.

```json
{ "queries": "electric cars", "timeRange": "week" }
```

```json
{ "queries": "electric cars", "dateFrom": "2026-01-01", "dateTo": "2026-03-31" }
```

### Use cases

- **News and fresh-content monitoring**: what Google shows for a topic or brand from the past day, week or month.
- **Rank tracking and SEO**: positions of your pages and your competitors' pages for a keyword list, per country.
- **Market and competitor research**: who advertises on which keywords, what the shopping ads cost.
- **Lead generation**: companies ranking for "service + city" queries, with their websites.
- **Content research**: People Also Ask questions and related searches for a topic.
- **AI agents and automations**: fresh web search results as structured JSON for n8n, Make, Zapier or an LLM tool.

### Pricing

**$0.45 per 1,000 result pages** (10 results each, i.e. $0.045 per 1,000 results), the same on every Apify plan, nothing to start a run. The cheapest full Google result page on Apify Store, with ads, shopping ads, questions and related searches included.

**Final price.** The per-page price is everything you pay: platform usage is included, there is no start fee and no per-run minimum. Some listings on the Store show a lower number and add platform usage on top; here the number on the listing is the number on your bill.

### Use it from n8n, Make, Zapier or an AI agent

Every Apify Actor is available through the Apify API, the n8n and Make integrations, Zapier, and as an MCP tool
(`https://mcp.apify.com/?tools=alfalfa/google-serp-scraper`). Start a run with the input JSON below and read the dataset
when the run finishes.

```json
{
  "queries": "hotels in prague\nbest laptop 2026",
  "maxPagesPerQuery": 2,
  "countryCode": "us",
  "languageCode": "en"
}
```

### FAQ

**Is this legal?** Scraping publicly available search results is generally allowed; you are responsible for how you use
the data and for complying with Google's terms and local law.

**Why mobile results?** Google serves different layouts to phones and desktops. The mobile layout is the majority
experience and includes the same organic results, ads and questions; positions can differ slightly from desktop.

**How are results localized?** By the Country and Language fields (Google's `gl` and `hl`). Queries with local
intent ("pizza near me") also depend on the location Google assumes for the request; set **Location (UULE)** to pin
them to a place.

**Why are some result URLs missing?** Very rarely a redirect cannot be resolved; the record then keeps Google's redirect
link, which still leads to the page.

**Does it support Google Images, News, Maps?** Not yet. Google Maps businesses are covered by the
[Google Maps Scraper](https://apify.com/alfalfa/google-maps-scraper).

### Was this useful?

If this Actor saved you time, a short review on its Store page helps others find it and tells me what to improve next. Missing a field or stuck on an input? Open an Issue on the Actor page; issues are answered within a day.

### Other Actors by alfalfa

[Facebook Events](https://apify.com/alfalfa/facebook-events-scraper) ·
[Facebook Posts](https://apify.com/alfalfa/facebook-posts-scraper) ·
[Facebook Pages](https://apify.com/alfalfa/facebook-pages-scraper) ·
[Facebook Comments](https://apify.com/alfalfa/facebook-comments-scraper) ·
[Facebook Ads Library](https://apify.com/alfalfa/facebook-ads-library-scraper) ·
[Google Maps](https://apify.com/alfalfa/google-maps-scraper) ·
[Google Ads Transparency](https://apify.com/alfalfa/google-ads-transparency-scraper) ·
[YouTube](https://apify.com/alfalfa/youtube-scraper) ·
[Amazon Products](https://apify.com/alfalfa/amazon-product-scraper) ·
[LinkedIn Jobs](https://apify.com/alfalfa/linkedin-jobs-scraper) ·
[LinkedIn Companies](https://apify.com/alfalfa/linkedin-company-scraper)

This Actor is not affiliated with or endorsed by Google.

# Changelog

This Actor's version history is a separate document: https://apify.com/alfalfa/google-serp-scraper/changelog.md

# Actor input Schema

## `queries` (type: `string`):

One search query per line, or full Google search URLs (<code>https://www.google.com/search?q=...</code>). Each query gives one record per result page.

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

How many result pages to scrape for each query (10 results per page). Pagination stops earlier when Google has no more results.

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

Two-letter country code the results should be localized to, e.g. <code>us</code>, <code>gb</code>, <code>de</code>, <code>cz</code> (Google's <code>gl</code> parameter). Leave empty for Google's default.

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

Two-letter language code of the results, e.g. <code>en</code>, <code>de</code>, <code>cs</code> (Google's <code>hl</code> parameter). Defaults to the country's main language, or English.

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

Only results from the past hour, 24 hours, week, month or year (Google's <em>Any time</em> filter). Leave <code>any</code> for no time filter. A custom date range below replaces it.

## `dateFrom` (type: `string`):

Only results published on or after this date (<code>YYYY-MM-DD</code>). Optional; leave empty for no lower bound.

## `dateTo` (type: `string`):

Only results published on or before this date (<code>YYYY-MM-DD</code>). Optional; leave empty for today. Date from and Date to together form a custom range that replaces the Time range.

## `locationUule` (type: `string`):

Encoded location for local results (Google's <code>uule</code> parameter). Optional.

## `resolveUrls` (type: `boolean`):

Google hides the target of every result link behind a redirect. When on, each result's <code>url</code> is the real destination (an extra small request per result). When off, <code>url</code> is the Google redirect link.

## `saveHtml` (type: `boolean`):

Add the full HTML of each result page to the record as <code>html</code> (large).

## `maxConcurrency` (type: `integer`):

How many result pages are scraped in parallel. The default follows the run memory (one per 512 MB).

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

Residential proxies are included in the price per page. Leave the default; setting a proxy country here forces the requests to be made from that country (results follow the Country field above).

## Actor input object example

```json
{
  "queries": "hotels in seattle\nbest laptop 2026",
  "maxPagesPerQuery": 1,
  "countryCode": "us",
  "languageCode": "en",
  "timeRange": "any",
  "dateFrom": "2025-01-01",
  "dateTo": "2025-06-30",
  "resolveUrls": true,
  "saveHtml": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `pages` (type: `string`):

All scraped result pages as JSON (organicResults, paidResults, paidProducts, peopleAlsoAsk, relatedQueries). Append ?format=csv for CSV.

# 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": `hotels in seattle
best laptop 2026`,
    "countryCode": "us",
    "languageCode": "en",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alfalfa/google-serp-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": """hotels in seattle
best laptop 2026""",
    "countryCode": "us",
    "languageCode": "en",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("alfalfa/google-serp-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": "hotels in seattle\\nbest laptop 2026",
  "countryCode": "us",
  "languageCode": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call alfalfa/google-serp-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alfalfa/google-serp-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/3JWxPwd3zFLJGdWfZ/builds/vyv6xyyHlQA1vNfJX/openapi.json
