# Google Search API (from $0.17 / 1,000 pages) (`serpdata/google-search-api`) Actor

Google search results as JSON from $0.17 per 1,000 result pages of up to 10 results. Rich mode adds People Also Ask, top stories, local pack, shopping and videos at no extra cost. Batch runs or a live HTTP API.

- **URL**: https://apify.com/serpdata/google-search-api.md
- **Developed by:** [SerpData](https://apify.com/serpdata) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.17 / 1,000 result pages

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 API

Get Google search results as clean JSON, from [SerpData](https://serpdata.dev), from
**$0.17 per 1,000 result pages**, more than 10 times cheaper than the most popular Google
search scraper on Apify, on every plan. Most searches return in well under a second.

Search any query from any country or city, in any language, over any date range. Get
the organic results, or the full results page with People Also Ask, top stories, the
local pack, shopping, videos and related searches at the same price.

### Why use this Google search scraper?

- **Lowest price on Apify.** From $0.17 per 1,000 result pages, charged only for pages
  returned. A search that fails is free.
- **Rich results at no extra cost.** The full results page costs the same as the
  organic results.
- **Fast.** Most searches return in well under a second.
- **Any location and language.** Search as if from a country or a city, keep only pages
  from one country or in one language, and set Google's interface language.
- **Date ranges and filters.** The past hour, day, week, month or year, or dates you
  choose; file types such as PDF; no spelling correction; SafeSearch.
- **Batch or live.** Run it in bulk from the Apify Console, or call it like an API.

### What data can I extract from Google Search?

| Simple mode (organic results) | Rich mode adds |
| --- | --- |
| Title | People Also Ask |
| Link | Top stories |
| Snippet | The local pack |
| Position | Shopping |
| Sitelinks, when the page has them | Videos |
| Date and rating, when Google shows them | Related searches |

Each result page also records the search parameters it ran with.

### How to scrape Google search results

1. Click **Try for free**.
2. Enter one search per line, such as "roman aqueducts".
3. Choose organic results or the full results page, how many pages you want per
   search, and any location, language or date settings.
4. Click **Start**, then download the results as JSON, CSV, Excel, XML or HTML.

### Input

```json
{
  "queries": ["roman aqueducts", "pont du gard"],
  "mode": "rich",
  "maxPagesPerQuery": 2,
  "gl": "fr",
  "quickDateRange": "m6"
}
```

| Field | What it does |
| --- | --- |
| `queries` | One Google search per line |
| `mode` | `simple` for the organic results, `rich` for the full results page |
| `maxPagesPerQuery` | Pages of ten results per search, up to 10 |
| `gl` | Two-letter country code, such as `gb`. Required when `uule` is set |
| `uule` | A city, as a canonical-name Google UULE starting with `w+`. Set the matching `gl` too |
| `restrictToCountry` | Only pages from this country, such as `de`. Sent to Google as `cr=countryDE` |
| `searchLanguage` | Only pages in this language, such as `de`. Sent as `lr=lang_de` |
| `languageCode` | Google's interface language, such as `de` or `pt-BR`. Sent as `hl` |
| `quickDateRange` | The past hour, day, week, month or year (`h`, `d`, `w`, `m`, `y`), with an optional count: `d10` is the past 10 days |
| `afterDate`, `beforeDate` | A date such as `2026-01-31`, or a time ago such as `3 months`, in UTC. Use these or `quickDateRange`, not both |
| `fileTypes` | File types such as `pdf` and `docx`. Each search gets `filetype:pdf OR filetype:docx` added |
| `includeUnfilteredResults` | Also return the similar results Google normally hides (`filter=0`) |
| `disableAutocorrect` | Search for each query as typed, even if Google would correct it (`nfpr=1`) |
| `safeSearch` | Hide explicit results (`safe=active`) |

### Output

One dataset item per result page:

```json
{
  "page": 1,
  "searchParameters": { "q": "pont du gard", "type": "search", "engine": "google" },
  "organic": [
    {
      "title": "Pont du Gard",
      "link": "https://en.wikipedia.org/wiki/Pont_du_Gard",
      "snippet": "The Pont du Gard is an ancient Roman aqueduct bridge built in the first century AD to carry water over 50 km (31 mi) to the Roman colony of Nemausus (Nîmes).",
      "position": 1
    }
  ],
  "latencyMs": 369
}
```

In rich mode, a page also carries `peopleAlsoAsk`, `topStories`, `places`, `shopping`,
`videos` and `relatedSearches` when Google shows them. `searchParameters` lists every
location, language and date setting the search used.

### How much does it cost to scrape Google search results?

**From $0.17 per 1,000 result pages**, in either mode, with no start fee and no monthly
fee. A page is one Google results page of up to 10 results. You are charged only for
pages returned; a search that fails is not charged. The price drops on bigger Apify plans:

| Apify plan | Price per 1,000 result pages |
| --- | --- |
| Free | $0.20 |
| Starter | $0.19 |
| Scale | $0.18 |
| Business | **$0.17** |

- The **free Apify plan** includes $5 of usage a month, enough for about **25,000
  result pages**.
- The **Starter plan** ($19 a month) covers about **100,000 result pages** a month.

### Use cases

- **SEO rank tracking:** see where your pages and your competitors' pages rank, in any
  country or city.
- **Keyword research:** collect People Also Ask questions and related searches.
- **Competitor monitoring:** watch who ranks for the searches you care about, and how
  that changes.
- **Brand and news monitoring:** find new pages mentioning a name, with a date range.
- **AI and RAG:** ground language models in fresh search results.
- **Market research:** see which businesses, products and sources show up for a topic.

### Live HTTP API

This Actor also runs in Standby mode, so you can call it like any API and get the
result in the response:

```sh
curl "https://serpdata--google-search-api.apify.actor/search?q=roman+aqueducts&mode=rich" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

Query parameters:

| Parameter | Description |
| --- | --- |
| `q` | The search query. Required. |
| `mode` | `simple` (default) or `rich`. |
| `start` | Offset into the results: 0, 10, 20 … up to 90. |
| `gl` | Two-letter country code. Required when `uule` is set. |
| `uule` | Canonical-name Google UULE starting with `w+`. |
| `hl` | Google's interface language, such as `de` or `pt-BR`. |
| `lr` | Only pages in these languages, such as `lang_de`. Join up to ten with `\|`. |
| `tbs` | Date filter: `qdr:d` for the past day (`h`, `d`, `w`, `m`, `y`, with an optional count such as `qdr:m6`), or `cdr:1,cd_min:1/31/2026,cd_max:3/1/2026` for a range in month/day/year. |
| `filter` | `0` also returns the similar results Google normally hides. |
| `cr` | Only pages from these countries, such as `countryDE`. Join up to ten with `\|`. |
| `safe` | `active` turns on SafeSearch; `off` turns it off. |
| `nfpr` | `1` searches for the query as typed, without spelling correction. |

Responses have the same shape as dataset items, without `page`. Errors return JSON
with a `message` and are never charged. `400` means a parameter is invalid, `402` means
the run has reached its maximum cost, and `429` means too many requests at once, so
slow down and retry. Any `5xx` status means the search could not be completed; it is
safe to send the same request again.

### Integrations and API access

- **No-code:** connect runs to Make, Zapier, Google Sheets, Google Drive, Slack, Amazon
  S3 and others, or trigger anything with a webhook.
- **Scheduling:** run daily or weekly to track rankings over time.
- **Code:** use the Apify API, or the `apify-client` package for Node.js or Python.
- **AI agents:** call this Actor through the Apify MCP server.

### Frequently asked questions

#### Is it legal to scrape Google search results?

Google search results are public and can be read without an account. Whether you can
collect and use them depends on where you are and what you do with the data, so check
Google's terms of service and get legal advice for your use case.

#### What is the difference between simple and rich mode?

Simple mode returns the organic results. Rich mode reads the full results page and adds
People Also Ask, top stories, the local pack, shopping, videos and related searches.
Both cost the same.

#### How many results can I get for one search?

Up to 10 pages of ten results, so 100 results per search. Set **Pages per query**.

#### Can I search as if from another country or city?

Yes. Set **Country** to a two-letter code such as `gb`. For a city, also set **City
(UULE)** to a canonical-name Google UULE.

#### Can I get only recent results?

Yes. Set **Quick date range**, such as `w` for the past week, or set **After date** and
**Before date**.

#### What export formats are supported?

JSON, CSV, Excel, XML and HTML, from the dataset of any run.

### Current limits

- Up to 100 results (10 pages) per search.
- The knowledge panel is not included.
- Verbatim mode is not supported.

### Related Actors

- [Google Maps Scraper](https://apify.com/serpdata/google-maps-scraper): places,
  details and photos from $0.034 per 1,000 places.
- [Google Maps Reviews Scraper](https://apify.com/serpdata/google-maps-reviews-scraper):
  every review for any place, $0.01 per 1,000 reviews.
- [Indeed Scraper](https://apify.com/serpdata/indeed-scraper): Indeed jobs from 62
  countries, $0.03 per 1,000 jobs.

# Actor input Schema

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

One Google search per line.

## `mode` (type: `string`):

simple returns organic results only. rich also returns People Also Ask, top stories, the local pack, shopping, images, videos and related searches.

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

How many pages of ten results to fetch for each query. Each page is charged as one result.

## `gl` (type: `string`):

Two-letter country code, such as gb. Required when a location is set.

## `uule` (type: `string`):

Canonical-name Google UULE starting with w+, such as w+CAIQICIdTG9uZG9uLEVuZ2xhbmQsVW5pdGVkIEtpbmdkb20= for London. Set the matching country too.

## `restrictToCountry` (type: `string`):

Two-letter country code, such as de. Unlike Country, which localizes results, this leaves out pages from other countries. Sent to Google as cr=countryDE.

## `searchLanguage` (type: `string`):

Only return pages written in this language. Sent to Google as lr.

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

The language of Google's page labels. It can also change which results rank. Sent to Google as hl.

## `quickDateRange` (type: `string`):

Only results from the past hour (h), day (d), week (w), month (m) or year (y), with an optional count: d10 is the past 10 days, m6 the past 6 months. Don't combine with the before and after dates.

## `afterDate` (type: `string`):

Only results from this date on. A date such as 2026-01-31, or a time ago such as 3 months. Dates are UTC.

## `beforeDate` (type: `string`):

Only results up to this date. A date such as 2026-03-01, or a time ago such as 8 days. Dates are UTC.

## `fileTypes` (type: `array`):

Only results of these file types. Each query gets filetype: terms joined with OR, such as filetype:pdf OR filetype:docx.

## `includeUnfilteredResults` (type: `boolean`):

Also return the similar results Google normally hides. Sent to Google as filter=0.

## `disableAutocorrect` (type: `boolean`):

Search for each query exactly as typed, even when Google would correct its spelling. Sent to Google as nfpr=1.

## `safeSearch` (type: `boolean`):

Hide explicit results. Sent to Google as safe=active.

## Actor input object example

```json
{
  "queries": [
    "roman aqueducts"
  ],
  "mode": "simple",
  "maxPagesPerQuery": 1,
  "includeUnfilteredResults": false,
  "disableAutocorrect": false,
  "safeSearch": false
}
```

# Actor output Schema

## `overview` (type: `string`):

A table of each result page: the search, page number, organic results, People Also Ask and related searches.

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

Every field of every result page, including top stories, the local pack, shopping and videos in rich mode.

# 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": [
        "roman aqueducts"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("serpdata/google-search-api").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": ["roman aqueducts"] }

# Run the Actor and wait for it to finish
run = client.actor("serpdata/google-search-api").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": [
    "roman aqueducts"
  ]
}' |
apify call serpdata/google-search-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,serpdata/google-search-api"
        }
    }
}
```

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/sThqtUZl2teslhhLN/builds/cdheNpQfgr8JjTdgJ/openapi.json
