# Google & Bing SERP Scraper — SerpApi Alternative (`khadinakbar/serpapi-alternative`) Actor

Scrape current Google or Bing search results for supplied queries. Get one SERP snapshot per query with organic ranks, titles, snippets, destination URLs, feature summaries, locale, device, and collection time.

- **URL**: https://apify.com/khadinakbar/serpapi-alternative.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** SEO tools, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 serp snapshots

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 & Bing SERP Scraper — SerpApi Alternative

Scrape current Google or Bing search results for supplied queries. Get one SERP snapshot per query with organic ranks, titles, snippets, destination URLs, feature summaries, locale, device, and collection time. For search analysts, each dataset row is one query-level SERP snapshot containing its retained organic results.

### Workflow: put the results to work

Choose the engine, queries, location, language, and device before running. Read each query's ranked results and retained feature summaries, then use the snapshot in a research report. Keep the search context fixed when comparing later observations.

### What this Actor covers

For the bounded job of collecting current Google or Bing organic SERP snapshots, yes: this Actor returns one structured, source-linked and timestamped dataset row per plain-language query. It does not claim to replace SerpApi's wider search-engine catalogue, endpoint families, historical products, dashboard, account tooling, or support.

### What this SERP API returns

- One normalized snapshot for each processed Google or Bing query.
- Up to 20 organic results per snapshot, ordered by observed result position.
- Title, URL, domain, displayed URL, and snippet fields for each retained result when surfaced.
- Bounded summaries of observed feature types, featured snippets, People Also Ask questions, and related searches.
- Requested location name, language code, and desktop or mobile context on every row.
- A public engine search URL and ISO collection timestamp for provenance.
- A compact `OUTPUT` record plus a detailed `RUN_SUMMARY` for every terminal run.

The workflow does not use caller-supplied API keys, passwords, cookies, sessions, or search-engine logins. Owner-managed provider access is kept out of the public input, dataset, `OUTPUT`, and logs.

### Quick start

Provide ordinary search queries. The default is a single Google desktop query in the United States.

```json
{
    "queries": ["best project management software", "AI SEO tools"],
    "engine": "google",
    "locationName": "United States",
    "languageCode": "en",
    "device": "desktop",
    "maxResults": 10
}
```

Use `engine: "bing"` for the same bounded snapshot contract on Bing. `locationName` supports a real country, region, city, or city-and-country name supported by the live search provider. `maxResults` controls how many organic results are retained per snapshot; it accepts 1–20.

This v1 intentionally accepts plain-language queries only. Cost-multiplier advanced operators such as `site:`, `inurl:`, and `intitle:` are rejected before provider work so the Actor can keep its published cost boundary predictable.

### Output contract

The default dataset receives one `serp-snapshot` row per accepted query. The shape stays stable for API exports and hosted Apify MCP use.

```json
{
    "recordType": "serp-snapshot",
    "query": "best project management software",
    "engine": "google",
    "locationName": "United States",
    "languageCode": "en",
    "device": "desktop",
    "requestedMaxResults": 10,
    "providerDepth": 10,
    "organicResultCount": 10,
    "organicResults": [
        {
            "position": 1,
            "title": "Example result title",
            "url": "https://example.com/",
            "domain": "example.com",
            "displayedUrl": "example.com",
            "snippet": "Observed SERP snippet."
        }
    ],
    "features": {
        "featureTypes": ["people_also_ask", "related_searches"],
        "featuredSnippet": null,
        "peopleAlsoAsk": ["What is project management software?"],
        "relatedSearches": ["project management tools"]
    },
    "sourceUrl": "https://www.google.com/search?q=best+project+management+software",
    "source": "managed-search-api",
    "snapshotStatus": "OK",
    "collectedAt": "2026-09-07T12:00:00.000Z"
}
```

`sourceUrl` is the public search surface represented by the snapshot. It does not prove that every result will be identical for every searcher: search engines vary by time, locale, device, personalization, and live layout. `features` is deliberately bounded rather than a raw page or an invented feature-parity claim.

### Outcomes and troubleshooting

Every terminal path writes `OUTPUT` and `RUN_SUMMARY` before it exits. Read `OUTPUT` first for the machine-friendly outcome, then use `RUN_SUMMARY` for provider attempts, cost-cap state, and safe diagnostics.

| Outcome           | Meaning                                                                                            | What to do                                                        |
| ----------------- | -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| `COMPLETE`        | All requested snapshots were persisted.                                                            | Read the default dataset.                                         |
| `PARTIAL`         | Useful snapshots were saved but an input route, cost cap, or time boundary stopped remaining work. | Read saved rows and retry only missing queries.                   |
| `VALID_EMPTY`     | The requested search contexts completed but none retained organic results.                         | Adjust the query or locale; no data was fabricated.               |
| `INVALID_INPUT`   | A caller can correct the request.                                                                  | Use one to 20 plain-language queries and supported option values. |
| `UPSTREAM_FAILED` | The required managed search route failed before useful data could be saved.                        | Retry later with the same small input.                            |
| `CONFIG_ERROR`    | Owner-managed provider access is unavailable.                                                      | Contact the Actor owner; do not add a credential to input.        |

### API, schedules, and agents

Start a run through the Apify API:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/khadinakbar~serpapi-alternative/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"queries":["AI SEO tools"],"engine":"google","locationName":"United States","languageCode":"en","device":"desktop","maxResults":10}'
```

Use the returned default dataset for snapshot rows, `OUTPUT` for the terminal result, and `RUN_SUMMARY` for audit details. Save a stable query list as an Apify task when you want recurring search observations, route the output into a warehouse or spreadsheet, or call the Actor through an Apify MCP client.

#### Agent prompt

> Get current Google organic SERP snapshots for “AI SEO tools” and “best project management software” in the United States. Return the result positions, URLs, titles, snippets, observed feature summaries, source URLs, collection times, and terminal outcome. Do not infer ranking guarantees or full SerpApi product parity.

### How this workflow compares with SerpApi

This Actor covers one central search-data workflow: on-demand Google or Bing organic SERP snapshots for a caller-supplied query list. It is useful when a workflow needs stable JSON rows, explicit limits, source URLs, timestamps, API invocation, export, scheduling, or agent orchestration through Apify.

SerpApi remains the better fit when you need its broader engine catalogue, dedicated endpoint families beyond this Google/Bing organic scope, historical products, account tooling, dashboard, support model, or other suite features. No same-job speed, reliability, coverage, or price-equivalence claim is made here.

| Decision   | This Actor                                                                                                  | SerpApi                                                                 |
| ---------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Core scope | Bounded current Google or Bing organic SERP snapshots.                                                      | Broader search-data product and endpoint suite.                         |
| Input      | One to 20 plain-language queries with locale, language, device, and result cap.                             | Its own documented API and product workflows.                           |
| Output     | One source-linked, timestamped snapshot per query in an Apify dataset.                                      | Its own response contracts and product outputs.                         |
| Cost model | Per persisted snapshot plus Apify platform usage; see the live Pricing tab.                                 | Its own current pricing and account terms.                              |
| Efficiency | One processed unique query produces one snapshot row; duplicate query text is removed before provider work. | Broader suite workflow efficiency is outside this same-job comparison.  |
| Best fit   | API-first snapshots, exports, schedules, and agent workflows.                                               | Broader endpoint coverage and suite capabilities outside this boundary. |

### Evidence and freshness

The release audit checks the provider route, input cap, output fields, retry behavior, delayed storage readback, and event charges before handoff. Every persisted row carries its own `sourceUrl` and `collectedAt` value so downstream systems can retain the observation context instead of treating a past SERP state as permanent.

#### Builder's note

I built this as a deliberately small search-observation primitive: one bounded query becomes one timestamped, source-linked dataset row. That makes recurring rank checks, content research, and downstream automation easier to inspect than a broad response object with unclear row-level provenance.

### Responsible use and data quality

Use this Actor only for queries and search-result data you are authorized to collect and process under applicable law and the relevant platform terms. The Actor collects current result metadata, not private accounts, credentials, cookies, or full target-page bodies. Search-result ordering and feature blocks are observations, not endorsements, traffic metrics, ranking forecasts, or a guarantee of what any end user will see.

### FAQ

#### Can I integrate this SERP API with a spreadsheet, warehouse, or automation?

Yes. Export the default dataset as JSON, CSV, Excel, or another Apify-supported format, or start runs through the Apify API, schedules, webhooks, and downstream workflows.

#### Can I use it with the Apify API?

Yes. The API example above starts a run. Read the resulting dataset for snapshots and retrieve `OUTPUT` or `RUN_SUMMARY` from the default key-value store for terminal status.

#### Can an AI agent call it through an MCP server?

Yes. Hosted Apify MCP clients can discover an eligible Actor, inspect its input/output contract, run it with a bounded query list, and read the dataset plus terminal records. Give the agent an explicit engine, locale, and desired output fields.

#### Does a successful test mean every future SERP run will succeed?

No. A release matrix can show the observed result for its tested inputs, not a lifetime success guarantee. Search engines, provider availability, locale support, caller cost caps, and input quality can change; use `OUTPUT`, `RUN_SUMMARY`, and the source timestamp for each actual run.

#### Is collecting search-result data legal?

This is not legal advice. You are responsible for your use, applicable law, and relevant service terms. Keep requests bounded, avoid sensitive or personal data, and use the source and timestamp fields to retain provenance.

#### Your feedback

If a query, locale, or feature block needs clarification, include the exact public query, engine, location, language, device, and run ID in your report. Do not include passwords, tokens, cookies, or other secrets.

### Pricing and run costs

This Actor uses **Pay per event plus Apify platform usage**. The [Pricing tab](https://apify.com/khadinakbar/serpapi-alternative/pricing) lists the current event rates and billing terms.

| Event | Billing unit | When it applies |
|---|---|---|
| `apify-actor-start` | Actor Start | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). |
| `serp-snapshot` | SERP snapshot | Charged once for each validated Google or Bing SERP snapshot persisted to the default dataset. |

Run cost combines the charged events and Apify platform usage. Review the run charge limit and requested result count before starting.

### Independent alternative

This Actor provides the specific workflow described above. It is not affiliated with or endorsed by SerpApi; the named product and its trademarks belong to their respective owners.

### Connect an AI agent

Use the [Apify MCP configurator](https://mcp.apify.com) to choose an available client connection. Inspect this Actor’s current input schema and required credentials before running it.

# Actor input Schema

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

One to 20 plain-language queries to snapshot. Each unique query produces one structured Google or Bing snapshot. Use ordinary queries such as 'best project management software'; advanced search operators are intentionally rejected to keep pricing predictable.

## `engine` (type: `string`):

Choose Google or Bing for the entire run. Use Google for Google organic results and common SERP features, or Bing for Bing organic results and Bing feature summaries. Defaults to Google.

## `locationName` (type: `string`):

Location name used by the managed search provider, for example 'United States', 'United Kingdom', or 'Berlin, Germany'. Defaults to United States; use a real location name rather than a proxy setting.

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

Two- to five-letter search-result language code, such as en, de, es, or pt-BR. Defaults to en. This changes the requested result language; it is not a locale or an API credential.

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

Request desktop or mobile SERP data. Desktop is the default; mobile can return a different layout and ranking context. This sets result context only, not an interactive browser session.

## `maxResults` (type: `integer`):

Maximum organic results retained in each snapshot (1–20). The Actor requests a rounded provider depth and trims the response to this cap, so the limit also bounds the per-snapshot event cost.

## Actor input object example

```json
{
  "queries": [
    "best project management software",
    "AI SEO tools"
  ],
  "engine": "google",
  "locationName": "United States",
  "languageCode": "en",
  "device": "desktop",
  "maxResults": 10
}
```

# Actor output Schema

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

Default dataset with one normalized Google or Bing snapshot per processed query.

## `summary` (type: `string`):

Compact OUTPUT record with outcome, counts, charges, and warnings.

## `runSummary` (type: `string`):

RUN\_SUMMARY with safe provider attempts, cost-cap state, and terminal diagnostics.

# 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": [
        "best project management software"
    ],
    "engine": "google",
    "locationName": "United States",
    "languageCode": "en",
    "device": "desktop",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/serpapi-alternative").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": ["best project management software"],
    "engine": "google",
    "locationName": "United States",
    "languageCode": "en",
    "device": "desktop",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/serpapi-alternative").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": [
    "best project management software"
  ],
  "engine": "google",
  "locationName": "United States",
  "languageCode": "en",
  "device": "desktop",
  "maxResults": 10
}' |
apify call khadinakbar/serpapi-alternative --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/serpapi-alternative"
        }
    }
}

```

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/kn970tsPI0MpH0bDu/builds/OpY2pAooVEJbttUgE/openapi.json
