# SERPApi Real-Time SERP (`alizarin_refrigerator-owner/serpapi-realtime`) Actor

Get real-time Google SERP snapshots with rich result extraction using SERPApi. This actor provides instant, real-time Google SERP snapshots powered by SERPApi. See exactly what appears on the search results page including organic results, local pack, featured snippets, People Also Ask, and more.

- **URL**: https://apify.com/alizarin\_refrigerator-owner/serpapi-realtime.md
- **Developed by:** [The Howlers](https://apify.com/alizarin_refrigerator-owner) (community)
- **Categories:** SEO tools, AI, Developer tools
- **Stats:** 18 total users, 1 monthly users, 97.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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/platform/actors/running/actors-in-store#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

## SERPApi Real-Time SERP Snapshots

Real-time search engine results from Google, Bing, Yahoo, DuckDuckGo, and more using SERPApi. Get organic results, featured snippets, knowledge panels, and SERP features.

**BYOK (Bring Your Own Key)** -- you provide your own API credentials.

***

### Before You Start

This actor requires your own API credentials to fetch real data.

**Where to get your key:** Your SERPApi API key

You can test with **Demo Mode** first (free, no key needed) to see the output format before committing.

***

### Quick Start

#### Test with Demo Mode (free, no API key needed)

```json
{
  "demoMode": true
}
```

#### Run with real data

```json
{
  "demoMode": false,
  "task": "google_search",
  "language": "en",
  "country": "us",
  "device": "desktop",
  "numResults": 10,
  "serpApiKey": "YOUR_API_KEY_HERE"
}
```

***

### Input Parameters

| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `task` | string | `"google_search"` | No | The SERP task to perform |
| `query` | string | - | No | The search query to execute |
| `queries` | array | - | No | Multiple queries for batch processing |
| `location` | string | - | No | Geographic location for localized results (e.g., 'Saint Louis, Missouri') |
| `language` | string | `"en"` | No | Language code (e.g., 'en' for English) |
| `country` | string | `"us"` | No | Country code (e.g., 'us' for United States) |
| `device` | string | `"desktop"` | No | Device type for results |
| `numResults` | integer | `10` | No | Number of results to return (max 100) |
| `serpApiKey` | string | - | Yes\* | Your SERPApi API key |
| `webhookUrl` | string | - | No | URL to receive results when the run completes |
| `demoMode` | boolean | `true` | No | Run in demo mode with sample data |

\*Required when Demo Mode is off.

***

### Pricing

This actor uses **pay-per-event** billing:

| Event | Description | Price |
|-------|-------------|-------|
| Search Performed | Each SERP search query performed | $0.02 |

**Demo mode is free** -- no charges for sample data.

***

### Troubleshooting

#### "API key is required"

You have Demo Mode turned **off** but didn't provide an API key. Either:

- Turn Demo Mode **on** to test with sample data
- Add your API key in the input

#### "API error 403" or "Unauthorized"

Your API key is invalid, expired, or doesn't have access to this specific API endpoint. Double-check your key and account permissions.

#### "API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

#### No results or empty dataset

Check the run log for error messages. Common causes:

- Invalid input format (check the examples above)
- API key without proper permissions
- The target data doesn't exist or is too small to track

#### How do I test without an API key?

Enable **Demo Mode** in the input. This returns realistic sample data so you can verify the output format works for your workflow.

***

**Built by John Rippy | [Actor Arsenal](https://actorarsenal.com)**

# Actor input Schema

## `task` (type: `string`):

The SERP task to perform

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

The search query to execute

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

Multiple queries for batch processing

## `location` (type: `string`):

Geographic location for localized results (e.g., 'Saint Louis, Missouri')

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

Language code (e.g., 'en' for English)

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

Country code (e.g., 'us' for United States)

## `device` (type: `string`):

Device type for results

## `numResults` (type: `integer`):

Number of results to return (max 100)

## `serpApiKey` (type: `string`):

Your SERPApi API key

## `webhookUrl` (type: `string`):

URL to receive results when the run completes

## `demoMode` (type: `boolean`):

Run in demo mode with sample data

## Actor input object example

```json
{
  "task": "google_search",
  "language": "en",
  "country": "us",
  "device": "desktop",
  "numResults": 10,
  "demoMode": false
}
```

# Actor output Schema

## `results` (type: `string`):

Real-time search engine results page data including organic results, local pack, featured snippets, and knowledge panels.

# 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 = {
    "demoMode": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("alizarin_refrigerator-owner/serpapi-realtime").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 = { "demoMode": False }

# Run the Actor and wait for it to finish
run = client.actor("alizarin_refrigerator-owner/serpapi-realtime").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "demoMode": false
}' |
apify call alizarin_refrigerator-owner/serpapi-realtime --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=alizarin_refrigerator-owner/serpapi-realtime",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/blEmEJejEx7r0e6vk/builds/7fYybZB8jSi3RHQNG/openapi.json
