# Google SERP Rank Tracker Scraper (`googleapi/google-serp-rank-tracker-scraper`) Actor

Track public Google Search rankings and visible SERP features for target domains across search phrases and pages.

- **URL**: https://apify.com/googleapi/google-serp-rank-tracker-scraper.md
- **Developed by:** [Google API](https://apify.com/googleapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

Capture public Google Search result pages for selected phrases and domains. The Actor records visible organic results, the position of tracked domains within the pages it inspected, and other search modules that appeared in the response.

A recorded position is an observation for that run’s phrase, location settings, and page range. Google results vary over time and by locale; this Actor does not promise a fixed or location-neutral rank.

### How to use

1. Enter search phrases or provide public Google Search URLs.
2. Add one or more `targetDomains` if you want to track their visible organic positions.
3. Choose language, country, and page limits.
4. Optionally enable browser rendering, visible page text, or People Also Ask answer expansion.
5. Run the Actor and review one snapshot per search.

Example:

```json
{
  "queries": ["web scraping", "website data extraction"],
  "targetDomains": ["example.org", "example.net"],
  "language": "en",
  "country": "us",
  "maxItems": 10,
  "maxPages": 2,
  "maxOrganicResultsPerPage": 10
}
```

### Input

| Input | Description | Default |
|---|---|---:|
| `queries` | Search phrases. `query` is an alias for one phrase. | — |
| `startUrls` | Public Google Search URLs with a `q` parameter. These take precedence over generated queries. | — |
| `targetDomains` | Domains to find in organic results. Matches the domain and its subdomains. `targetDomain` is an alias for one domain. | — |
| `language` / `country` | Language and country for generated searches. Existing URL settings are preserved. | `en` / `us` |
| `page` / `maxPages` | Starting page and maximum pages per search (up to 100). | 1 / 10 |
| `maxItems` | Maximum unique searches or URLs to process across the run. | 25 |
| `maxOrganicResultsPerPage` | Maximum organic result cards retained per page. | 10 |
| `renderJavaScript` | Render Google Search using a standard browser. | `false` |
| `includePaaAnswers` | Expand visible People Also Ask answers; requires browser rendering. | `false` |
| `maxPaaAnswers` | Maximum questions expanded per page. | 4 |
| `includePageText` | Include cleaned visible text from inspected search pages. | `false` |
| `rankingHistoryStoreName` | Name of the Key-Value Store used to compare observations across runs. | `google-serp-rank-tracker-history` |
| `proxyConfiguration` | Optional Apify Proxy configuration. | — |

### Output

Each dataset item represents a search snapshot and includes the search phrase, page range, organic result cards, and visible page features. It can contain AI Overviews, featured snippets, People Also Ask, videos, shopping, images, news, local businesses, knowledge panels, related searches, and page navigation when present.

When target domains are configured, the snapshot includes `targetRankings` with a match and organic position for each domain in the completed page range. A missing match is not assigned a guessed position. Single-domain convenience fields are also available when tracking exactly one domain.

Example dataset item:

```json
{
  "pageUrl": "https://www.google.com/search?q=web+scraping&hl=en&gl=us",
  "searchedPhrase": "web scraping",
  "searchLanguage": "en",
  "searchCountry": "us",
  "pageNumber": 1,
  "pagesChecked": 1,
  "isCompleteForConfiguredPages": true,
  "organicResultCount": 1,
  "organicResults": [
    {
      "title": "Public web scraping guide",
      "resultUrl": "https://example.org/guides/scraping",
      "domain": "example.org",
      "position": 1
    }
  ],
  "targetDomains": ["example.org"],
  "targetRankings": [
    {
      "targetDomain": "example.org",
      "found": true,
      "organicPosition": 1,
      "resultTitle": "Public web scraping guide"
    }
  ],
  "hasAiOverview": false,
  "hasPeopleAlsoAsk": false,
  "relatedSearches": ["web scraping guide"]
}
```

If you use the same history store and repeat the same search settings, the Actor can compare a completed observation with its prior position. Comparisons are meaningful only when phrase, domain, locale, filters, and page range match. A positive `positionChange` means the observed organic position improved. Partial or blocked searches do not replace completed history.

The Output tab shows the available result fields. Run summary information is available with the run output in Apify.

### Limits and responsible use

Results and positions can vary by time, locale, and Google’s page layout. More phrases and pages increase run time. Google may limit access; the Actor stops rather than bypassing access checks.

Use public search results responsibly and follow applicable privacy requirements and Google Search terms. This Actor is not affiliated with Google.

# Actor input Schema

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

Search phrases to track. Ignored when Start URLs are provided. Each phrase supports up to 200 characters; at most 500 are accepted before the global Maximum searches limit is applied.

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

Optional single-phrase alias for Search phrases.

## `targetDomains` (type: `array`):

Domains to find in organic Google results. Match includes the exact hostname or its subdomains. Protocols and URL paths are not needed. At most 100 domains are accepted.

## `targetDomain` (type: `string`):

Optional single-domain alias for Target domains.

## `startUrls` (type: `array`):

Optional Google /search URLs with a q parameter. When provided, these URLs take precedence over Search phrases; target domains and pagination limits still apply.

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

Two- or three-letter language code, optionally followed by a region. Used for generated searches; a language already present in a Google Search URL is preserved.

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

Two-letter country code used for generated searches. A country already present in a Google Search URL is preserved.

## `page` (type: `integer`):

One-based page number for generated searches. Google page offsets use the requested results-per-page setting; explicit start offsets in Google Search URLs take precedence.

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

Global maximum number of distinct search phrases or Google Search URLs to process in this run.

## `maxPages` (type: `integer`):

Maximum Google result pages fetched for each search. The actor stops sooner if Google exposes no next page or the result page is empty.

## `maxOrganicResultsPerPage` (type: `integer`):

Maximum organic result cards retained per page. Actual Google result counts may be lower and are never padded.

## `renderJavaScript` (type: `boolean`):

Use ordinary Chromium for each requested public Search page and expand the available main AI Overview. Default-off; challenges remain boundaries. GOOGLE_SERP supports static HTTP only.

## `includePageText` (type: `boolean`):

Include the complete cleaned visible text of fetched search pages.

## `requestTimeoutSecs` (type: `integer`):

Maximum time for each Google Search page request.

## `requestDelayMs` (type: `integer`):

Pause between pages for the same search. This is pacing only and does not bypass Google access controls.

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

Optional Apify proxy configuration. Apify proxy routing is used only when configured; residential proxy groups can be selected when available on your account.

## `includePaaAnswers` (type: `boolean`):

Expand a bounded number of public same-page answer disclosures with full available text and clean HTML. Requires Render public results; no publisher pages are fetched.

## `maxPaaAnswers` (type: `integer`):

Maximum distinct initial question disclosures expanded per page. Newly generated follow-up questions are not recursively opened.

## `maxRetries` (type: `integer`):

Retries for transient HTTP transport failures only. Explicit source challenges, unsafe redirects and oversized responses are not retried.

## `rankingHistoryStoreName` (type: `string`):

Named Apify key-value store used across runs for genuine prior ranking observations. Comparisons require the same phrase, domain, locale, filters and configured page range. Missing or partial source responses never overwrite history.

## Actor input object example

```json
{
  "language": "en",
  "country": "us",
  "page": 1,
  "maxItems": 25,
  "maxPages": 10,
  "maxOrganicResultsPerPage": 10,
  "renderJavaScript": false,
  "includePageText": false,
  "requestTimeoutSecs": 20,
  "requestDelayMs": 1000,
  "includePaaAnswers": false,
  "maxPaaAnswers": 4,
  "maxRetries": 1,
  "rankingHistoryStoreName": "google-serp-rank-tracker-history"
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("googleapi/google-serp-rank-tracker-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 = {}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,googleapi/google-serp-rank-tracker-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/xCmiK8Ql5POaAs9Q4/builds/WAt8GdJLT9ackG7MO/openapi.json
