# Google Search Results (SERP) Scraper (`rupom888/google-serp-scraper`) Actor

Scrape Google search results for any keyword. Extracts organic rankings (position, URL, title, description, sitelinks), featured snippets, People Also Ask, related searches, knowledge panel, and top ads. Supports web, news, images, and video search. Filter by language, country, and date range.

- **URL**: https://apify.com/rupom888/google-serp-scraper.md
- **Developed by:** [Syed Rupom](https://apify.com/rupom888) (community)
- **Categories:** Lead generation, SEO tools, Social media
- **Stats:** 111 total users, 33 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google SERP Scraper

Scrape Google Search results for any keyword — organic listings, featured snippets, People Also Ask, related searches, and ads. Supports web, news, images, and video search. Localized by country and language.

### What you get

- Organic search results with title, URL, description, position
- Featured snippets (answer boxes)
- People Also Ask questions and answers
- Related searches
- Sitelinks
- Ads (labeled separately)
- Knowledge panel data

### Output fields

| Field | Description |
|-------|-------------|
| `keyword` | Search keyword used |
| `position` | Rank position in results |
| `title` | Page title |
| `url` | Full URL |
| `displayUrl` | Breadcrumb/display URL shown in Google |
| `description` | Meta description / snippet text |
| `date` | Date snippet (if shown) |
| `sitelinks` | Sub-links shown under main result |
| `isAd` | Whether result is a paid ad |
| `isFeaturedSnippet` | Whether result is a featured snippet |
| `featuredSnippetText` | Featured snippet content |
| `searchType` | web / news / images / videos |
| `page` | SERP page number |

### Input parameters

| Parameter | Default | Description |
|-----------|---------|-------------|
| `keywords` | required | Search keywords (one search per keyword) |
| `resultsPerKeyword` | 10 | Results to extract (up to 100) |
| `searchType` | `web` | `web`, `news`, `images`, `videos` |
| `country` | `us` | Country code (`us`, `uk`, `ca`, `de`, `au`) |
| `language` | — | Language code (`en`, `es`, `fr`) |
| `dateRange` | — | `day`, `week`, `month`, `year` |
| `siteFilter` | — | Restrict to domain (e.g. `reddit.com`) |
| `proxyConfiguration` | — | Residential proxy recommended |

### Example input

```json
{
  "keywords": ["best running shoes 2025", "python web scraping tutorial"],
  "resultsPerKeyword": 20,
  "searchType": "web",
  "country": "us",
  "language": "en"
}
```

### Example output

```json
{
  "keyword": "best running shoes 2025",
  "position": 1,
  "title": "Best Running Shoes of 2025 - Runner's World",
  "url": "https://www.runnersworld.com/gear/a20842348/best-running-shoes/",
  "displayUrl": "runnersworld.com › gear › best-running-shoes",
  "description": "Our editors have tested hundreds of running shoes to find the best for every type of runner...",
  "isAd": false,
  "isFeaturedSnippet": false,
  "searchType": "web",
  "page": 1
}
```

### Proxy

Residential proxy recommended for scraping at scale. Google blocks datacenter IPs on repeated requests.

### Use cases

- SEO rank tracking and SERP monitoring
- Competitor research and keyword analysis
- Content gap analysis
- News monitoring by keyword
- Market research and trend analysis

# Actor input Schema

## `keywords` (type: `array`):

Search keywords to look up on Google. Each keyword runs as a separate search.

## `resultsPerKeyword` (type: `integer`):

Number of organic search results to extract per keyword (up to 100).

## `searchType` (type: `string`):

Type of Google search to perform.

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

Country code for localized results (e.g. 'us', 'uk', 'ca', 'au', 'de').

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

ISO 639-1 language code to filter results (e.g. 'en', 'es', 'fr'). Leave blank for all languages.

## `dateRange` (type: `string`):

Filter results by recency.

## `siteFilter` (type: `string`):

Restrict results to a specific domain (e.g. 'reddit.com'). Adds 'site:' operator to keyword.

## `extractAiOverview` (type: `boolean`):

Extract Google's AI-generated summary (AI Overview) if present, including the full text and cited sources.

## `extractShoppingResults` (type: `boolean`):

Extract shopping carousel results (product name, price, store, rating) when present.

## `extractVideoResults` (type: `boolean`):

Extract video carousel results (title, channel, duration, thumbnail, URL) when present.

## `extractLocalPack` (type: `boolean`):

Extract Google Maps local pack results (name, address, rating, phone) when present.

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

Residential proxy recommended for Google SERP scraping at scale.

## Actor input object example

```json
{
  "keywords": [
    "best running shoes 2025"
  ],
  "resultsPerKeyword": 5,
  "searchType": "web",
  "country": "us",
  "language": "en",
  "dateRange": "",
  "siteFilter": "reddit.com",
  "extractAiOverview": true,
  "extractShoppingResults": true,
  "extractVideoResults": true,
  "extractLocalPack": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "keywords": [
        "best running shoes 2025"
    ],
    "resultsPerKeyword": 5,
    "extractAiOverview": true,
    "extractShoppingResults": true,
    "extractVideoResults": true,
    "extractLocalPack": true,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rupom888/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 = {
    "keywords": ["best running shoes 2025"],
    "resultsPerKeyword": 5,
    "extractAiOverview": True,
    "extractShoppingResults": True,
    "extractVideoResults": True,
    "extractLocalPack": True,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("rupom888/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 '{
  "keywords": [
    "best running shoes 2025"
  ],
  "resultsPerKeyword": 5,
  "extractAiOverview": true,
  "extractShoppingResults": true,
  "extractVideoResults": true,
  "extractLocalPack": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call rupom888/google-serp-scraper --silent --output-dataset

```

## MCP server setup

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