# Google Search Scraper (`thescrappa/google-search-scraper`) Actor

Find Google Search results with page titles, displayed domains, snippets and links. Use the phrase, location and locale options to shape a Google results page for your query.

- **URL**: https://apify.com/thescrappa/google-search-scraper.md
- **Developed by:** [Scrappa](https://apify.com/thescrappa) (community)
- **Categories:** SEO tools, Marketing
- **Security:** Limited permissions
- **Stats:** 85 total users, 4 monthly users, 96.6% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 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.
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 Scraper

Find Google Search results with page titles, displayed domains, snippets and links. Use the phrase, location and locale options to shape a Google results page for your query.

### What data can you extract?

Titles, snippets and displayed links follow the search results for the selected phrase and region.

| Field | Type | Description |
| --- | --- | --- |
| `position` | number | Result position in the Google Search web search result list, as a whole number; null when the source does not supply one. |
| `title` | text | Title of the web search result, as shown by Google Search; null when no title is published. |
| `link` | link | Result link for this web search result on Google Search; null when the source does not provide a URL. |
| `displayed_link` | text | Displayed domain shown for the web search result by Google Search, in the format used by the source; null when it is omitted. |
| `snippet` | text | Search snippet from Google Search for this web search result; null when the source has no text to show. |
| `source` | text | Source or language label shown for the web search result by Google Search, in the format used by the source; null when it is omitted. |

### Use cases

- SEO teams can check which pages and domains appear for a query.
- Communications teams can monitor snippets and links for a brand or topic.
- Researchers can compare titles and domains across locales or repeat searches.

### How to use

1. Open the Actor’s **Input** tab and start with the JSON below.
2. Enter a topic or search phrase, then adjust the locale, page or time range fields that this Actor supports.
3. Start the run and open its default dataset to inspect or download the rows.

```json
{
  "query": "best restaurants in new york"
}
```

The run dataset can be downloaded as JSON, CSV, Excel or another format offered by Apify.

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | The search term or phrase to look up on Google |
| `location` | string | No | Geographic location for localized results (e.g., 'New York, NY, USA', 'London, UK') |
| `gl` | string | No | Two-letter country code for Google's country service (e.g., 'us', 'uk', 'de', 'fr') |
| `hl` | string | No | Two-letter language code for the interface (e.g., 'en', 'de', 'es', 'fr') |
| `google_domain` | string | No | Google domain to query (e.g., 'google.com', 'google.de', 'google.co.uk') |
| `start` | integer | No | Result offset for pagination. Use 0 for first page, 10 for second, 20 for third, etc. Constraints: minimum 0. |
| `amount` | integer | No | How many results to return per request (1-100) Constraints: minimum 1; maximum 100. |
| `safe` | string | No | Filter explicit content from results Constraints: allowed values: off, active. |
| `tbs` | string | No | Filter results by time. Examples: 'qdr:h' (past hour), 'qdr:d' (past day), 'qdr:w' (past week), 'qdr:m' (past month), 'qdr:y' (past year) |
| `tbm` | string | No | Type of Google search to perform Constraints: allowed values: , nws, vid, isch, shop. |

### Output example

The record below is synthetic. Names and links are examples, and private contact fields are omitted.

```json
{
  "title": "Seattle neighborhood market guide",
  "link": "https://search.example.com/results/market-guide",
  "displayed_link": "northstar.example/market-guide",
  "snippet": "A guide to choosing containers, light and watering schedules for a compact balcony herb garden.",
  "source": "Google Search"
}
```

### Pricing

**Current live price:** Apify Free tier: $0.30 per 1,000 results; Bronze: $0.25 per 1,000 results; Silver: $0.22 per 1,000 results; Gold, Platinum, and Diamond: $0.20 per 1,000 results.

Each saved source match counts as one result.

### FAQ

#### Is it legal to collect public information?

This Actor is for information visible on the public source pages it reads. You are responsible for checking the source terms, privacy and copyright rules, and the laws that apply to your use.

#### How many records will a run return?

The result count depends on the input limits, pagination settings and what the source makes available. A small query or unavailable page can return fewer records, including none.

#### Can I call it through the API or connect it to other tools?

Yes. Send the same JSON input to `POST https://api.apify.com/v2/acts/thescrappa~google-search-scraper/runs`, then read the run’s default dataset. Make, Zapier and n8n can start runs and pass dataset rows to the next step; Google Sheets can receive rows through those workflows or a dataset export.

#### What happens when a request fails?

Check the run log for the source or input error, correct the input and retry after a temporary source issue. A run can contain rows saved before a later request failed.

#### How can I target a Google Search market?

Set `query` to the phrase and use `gl`, `hl` or `google_domain` for supported market and language settings. `location` can further localize a search.

### Related Scrappa Actors

- [Google Trends Autocomplete Scraper](https://apify.com/thescrappa/google-trends-autocomplete-scraper)
- [Google Trends Interest Scraper](https://apify.com/thescrappa/google-trends-interest-scraper)
- [Google Trends Related Queries Scraper](https://apify.com/thescrappa/google-trends-related-queries-scraper)
- [Google Search Results Scraper](https://apify.com/thescrappa/scrappa-google-search)
- [Startpage Search Scraper](https://apify.com/thescrappa/startpage-search-scraper)

# Actor input Schema

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

The search term or phrase to look up on Google

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

Geographic location for localized results (e.g., 'New York, NY, USA', 'London, UK')

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

Two-letter country code for Google's country service (e.g., 'us', 'uk', 'de', 'fr')

## `hl` (type: `string`):

Two-letter language code for the interface (e.g., 'en', 'de', 'es', 'fr')

## `google_domain` (type: `string`):

Google domain to query (e.g., 'google.com', 'google.de', 'google.co.uk')

## `start` (type: `integer`):

Result offset for pagination. Use 0 for first page, 10 for second, 20 for third, etc.

## `amount` (type: `integer`):

How many results to return per request (1-100)

## `safe` (type: `string`):

Filter explicit content from results

## `tbs` (type: `string`):

Filter results by time. Examples: 'qdr:h' (past hour), 'qdr:d' (past day), 'qdr:w' (past week), 'qdr:m' (past month), 'qdr:y' (past year)

## `tbm` (type: `string`):

Type of Google search to perform

## Actor input object example

```json
{
  "query": "best restaurants in new york",
  "start": 0,
  "amount": 10,
  "safe": "off",
  "tbm": ""
}
```

# Actor output Schema

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

All results from this run in the default dataset.

# 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 = {
    "query": "best restaurants in new york"
};

// Run the Actor and wait for it to finish
const run = await client.actor("thescrappa/google-search-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 = { "query": "best restaurants in new york" }

# Run the Actor and wait for it to finish
run = client.actor("thescrappa/google-search-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 '{
  "query": "best restaurants in new york"
}' |
apify call thescrappa/google-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thescrappa/google-search-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/2pU7EbKhShUz8BAnN/builds/3hOV9ZzlKtIgr5eEc/openapi.json
