# Google Maps Scraper (`searchapi/google-maps-scraper`) Actor

Extracts public place and business results from Google Maps: names, categories, addresses, coordinates, ratings, reviews, hours, phones, websites, and photos.

- **URL**: https://apify.com/searchapi/google-maps-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** Automation, Developer tools, Lead generation
- **Stats:** 3 total users, 1 monthly users, 84.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search 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

## Google Maps Places Search Scraper

Collect public Google Maps place results from one user-friendly query or a batch of search terms. Version 2 extracts list results and, by default, enriches each selected place concurrently from its public detail page.

### Modes and input

- Single: `query`, `maxItems`, `gl`, and `hl`.
- Batch: `searchTerms` (or legacy `searchStringsArray`), optional `locationQuery`, and `maxPlaces` (or `maxCrawledPlacesPerSearch`).
- Filters: `minimumRating`/`placeMinimumStars` and `closedPlacesFilter`.
- Detail controls: `includeDetails`, `requireDetails`, and `maxDetailConcurrency`.
- Runtime controls: `maxRequestRetries`, `navigationTimeoutSecs`, fingerprint profile, and `proxyConfiguration`.

The Actor retains backward-compatible batch aliases. It rejects `GOOGLE_SERP` because that product supports HTTP Google Search results, not the interactive Google Maps page. Direct mode is the verified default; an authorized Residential or custom proxy can be used when required.

### Output

Each record has a stable Google place identity and requested search context. Detail enrichment reads the public place page and can include the description, category list, full address parts, formatted and unformatted phone, website, coordinates, rating, review count, raw and day-by-day hours, open state, price, place ID, CID, plus code, visible photo URLs and categories, review distribution, review topics, review summary, individual reviews with reviewer metadata and photos, related places, service information, place/search URLs, source, extraction method, and ISO scrape time. `detailFetched` and `detailStatus` state whether that row was enriched.

Unavailable optional values are omitted rather than emitted as null/empty placeholders. Writes are atomic across a batch, duplicate identities are removed, listeners/pages are closed, and valid no-results searches finish with an empty dataset. Explicit block/challenge pages fail closed and are never stored; the Actor does not solve CAPTCHAs or bypass access controls.

### Validation

```sh
npm ci
npm test
npm audit --omit=dev
apify validate-schema
apify run --purge --input-file INPUT.json
```

# Changelog

This Actor's version history is a separate document: https://apify.com/searchapi/google-maps-scraper/changelog.md

# Actor input Schema

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

The place/business search term (e.g. 'restaurants in New York', 'coffee shops London')

## `searchTerms` (type: `array`):

Optional batch of public Google Maps place searches. When supplied, one search is run for each term.

## `searchStringsArray` (type: `array`):

Backward-compatible alias for searchTerms.

## `locationQuery` (type: `string`):

Optional location appended to every batch search term.

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

Maximum number of place results to retrieve

## `maxPlaces` (type: `integer`):

Batch-mode maximum places per search term.

## `maxCrawledPlacesPerSearch` (type: `integer`):

Backward-compatible alias for maxPlaces.

## `minimumRating` (type: `number`):

Batch-mode filter for source-backed ratings.

## `placeMinimumStars` (type: `string`):

Backward-compatible string alias for minimumRating.

## `closedPlacesFilter` (type: `string`):

Keep all places, skip explicit permanent closures, or keep only explicit permanent closures.

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

Google Maps language code for batch searches.

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

Two-letter Google Maps country code for batch searches.

## `fingerprintProfile` (type: `string`):

Coherent desktop browser profile for batch searches.

## `proxySessionId` (type: `string`):

Optional stable Apify Proxy session identifier.

## `includeDetails` (type: `boolean`):

Open selected place pages concurrently to enrich address, phone, website, rating, reviews, hours, coordinates, plus code, and images.

## `requireDetails` (type: `boolean`):

Fail atomically if any selected place cannot be enriched instead of saving truthful list-level records.

## `maxDetailConcurrency` (type: `integer`):

Maximum simultaneous place-detail pages.

## `maxRequestRetries` (type: `integer`):

Bounded retries for temporary browser/network failures.

## `navigationTimeoutSecs` (type: `integer`):

Maximum seconds for search and detail page navigation.

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

Two-letter country code for localized Maps results (e.g. 'us', 'uk', 'in')

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

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

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

Optional Residential or custom browser proxy. GOOGLE_SERP is incompatible with interactive Google Maps and is rejected.

## Actor input object example

```json
{
  "query": "restaurants in New York",
  "maxItems": 10,
  "maxPlaces": 20,
  "closedPlacesFilter": "all",
  "language": "en",
  "country": "US",
  "fingerprintProfile": "chrome-windows",
  "includeDetails": true,
  "requireDetails": false,
  "maxDetailConcurrency": 5,
  "maxRequestRetries": 2,
  "navigationTimeoutSecs": 60,
  "gl": "us",
  "hl": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `datasetConsole` (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 = {
    "query": "restaurants in New York",
    "maxItems": 10,
    "gl": "us",
    "hl": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/google-maps-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": "restaurants in New York",
    "maxItems": 10,
    "gl": "us",
    "hl": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("searchapi/google-maps-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": "restaurants in New York",
  "maxItems": 10,
  "gl": "us",
  "hl": "en"
}' |
apify call searchapi/google-maps-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,searchapi/google-maps-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/mFTFy8jieOOaGCHOh/builds/sKHbTuLZggUqzcznd/openapi.json
