# Google Maps Places Scraper (`thisismegant/google-maps-places-scraper`) Actor

Scrape public Google Maps place results by keyword and location

- **URL**: https://apify.com/thisismegant/google-maps-places-scraper.md
- **Developed by:** [Megan Studios](https://apify.com/thisismegant) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Maps Places Scraper

Scrape public Google Maps place search results by keyword and location. This Actor is built for lead research, local business discovery, market mapping, and directory enrichment across supported Google Maps locations.

Enter a business keyword such as `cafe`, `dentist`, `hotel`, `restaurant`, or `hardware store`, add one or more locations, and the Actor returns structured place data in an Apify Dataset that can be exported to JSON, CSV, Excel, XML, RSS, or HTML.

### What You Get

Each dataset item can include:

| Field | Description |
| --- | --- |
| `name` | Place or business name |
| `category` | Google Maps category when available |
| `formatted_address` | Address text |
| `phone_number` | Phone number when visible |
| `website` | Website URL when visible |
| `rating` | Google Maps rating |
| `latitude` | Latitude parsed from the Maps URL |
| `longitude` | Longitude parsed from the Maps URL |
| `image_url` | Main place image when available |
| `google_maps_url` | Google Maps place URL |
| `opening_hours` | Opening hours summary and periods when available |
| `business_status` | Basic open/closed status when available |
| `keyword` | Keyword used for the run |
| `location` | Location input used for the query |
| `search_query` | Final Google Maps search query |
| `reviews` | Optional review snippets when enabled |
| `dedup_hash` | Stable hash for deduplication |

### Example Input

```json
{
  "keyword": "cafe",
  "locations": ["New York"],
  "maxResultsPerLocation": 1,
  "maxReviewsPerPlace": 0,
  "language": "en-US",
  "delaySeconds": 1
}
````

### Example Output

```json
{
  "name": "Example Coffee Shop",
  "category": "Coffee shop",
  "formatted_address": "123 Example Street, New York, NY",
  "phone_number": "+1 212...",
  "website": "https://example.com",
  "rating": 4.5,
  "latitude": 40.7128,
  "longitude": -74.006,
  "google_maps_url": "https://www.google.com/maps/place/...",
  "keyword": "cafe",
  "location": "New York",
  "search_query": "cafe in New York",
  "source": "google_maps"
}
```

Actual output depends on what is publicly visible on Google Maps at run time.

### Input Options

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `keyword` | string | `cafe` | Business keyword or search term |
| `locations` | string array | `["New York"]` | One or more location names |
| `maxResultsPerLocation` | integer | `1` | Number of place detail pages to process per location |
| `maxReviewsPerPlace` | integer | `0` | Number of reviews to extract per place. Use `0` to skip reviews |
| `language` | string | `en-US` | Browser locale |
| `delaySeconds` | integer | `1` | Delay between place detail pages |

Current safety limits:

| Limit | Value |
| --- | --- |
| Max locations per run | 20 |
| Max results per location | 50 |
| Max reviews per place | 10 |
| Max delay seconds | 10 |

### How To Use

1. Open the Actor in Apify Console.
2. Fill in `keyword` and `locations`.
3. Start with a small test, for example `maxResultsPerLocation: 2`.
4. Open the **Dataset** tab after the run finishes.
5. Export the results as CSV, Excel, JSON, XML, RSS, or HTML.

### Output

The Actor stores:

- **Scraped places** in the default Apify Dataset.
- **Run summary** in the default key-value store under the `OUTPUT` record.

The summary includes:

```json
{
  "queries": 1,
  "found": 12,
  "saved": 2,
  "failed": 0,
  "blocked": false,
  "errors": [],
  "dataset_items": 2
}
```

### Recommended Test Inputs

Use small limits while testing:

```json
{
  "keyword": "dentist",
  "locations": ["New York"],
  "maxResultsPerLocation": 2,
  "maxReviewsPerPlace": 0,
  "language": "en-US",
  "delaySeconds": 1
}
```

Other useful examples:

| Keyword | Location |
| --- | --- |
| `hotel` | `London` |
| `hardware store` | `Sydney` |
| `restaurant` | `Singapore` |
| `car repair` | `Toronto` |

### Notes And Limitations

- This Actor uses browser automation with Playwright.
- This Actor does not use the Google Places API.
- This Actor does not log in to Google accounts.
- This Actor does not bypass CAPTCHA, consent blockers, suspicious activity pages, or other Google protection pages.
- If Google shows a CAPTCHA, consent blocker, suspicious activity page, or error page, the run stops and records the blocker status.
- Google Maps layout and selectors can change over time, so extracted fields may vary.
- Availability of phone numbers, websites, images, reviews, and opening hours depends on what is publicly visible on Google Maps.

### Tips To Reduce Usage Cost

- Start with `maxResultsPerLocation: 1` or `2`.
- Keep `maxReviewsPerPlace: 0` unless reviews are required.
- Test one location first before running many locations.
- Increase limits gradually after confirming the output.

### Use Cases

- Local lead generation
- Market research
- Competitor mapping
- Business directory enrichment
- Location intelligence
- Sales prospecting

### Responsible Use

Use this Actor responsibly and only for lawful purposes. Review Google Maps terms and local data protection rules before collecting, storing, or using scraped data.

# Actor input Schema

## `keyword` (type: `string`):

Search keyword, for example: cafe, dentist, hotel, restaurant, hardware store.

## `locations` (type: `array`):

One or more location names. Each location is combined with the keyword.

## `maxResultsPerLocation` (type: `integer`):

Maximum number of Google Maps place detail pages to process for each location.

## `maxReviewsPerPlace` (type: `integer`):

Set to 0 to skip reviews.

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

Browser locale used by Playwright.

## `delaySeconds` (type: `integer`):

Small polite delay between detail page visits.

## Actor input object example

```json
{
  "keyword": "cafe",
  "locations": [
    "New York"
  ],
  "maxResultsPerLocation": 1,
  "maxReviewsPerPlace": 0,
  "language": "en-US",
  "delaySeconds": 1
}
```

# Actor output Schema

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

Default dataset items containing place details.

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

Counts, blocker status, and errors for the run.

# 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 = {
    "keyword": "cafe",
    "locations": [
        "New York"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("thisismegant/google-maps-places-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 = {
    "keyword": "cafe",
    "locations": ["New York"],
}

# Run the Actor and wait for it to finish
run = client.actor("thisismegant/google-maps-places-scraper").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 '{
  "keyword": "cafe",
  "locations": [
    "New York"
  ]
}' |
apify call thisismegant/google-maps-places-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=thisismegant/google-maps-places-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Places Scraper",
        "description": "Scrape public Google Maps place results by keyword and location",
        "version": "0.1",
        "x-build-id": "97RRGEEtWYOPlYFwa"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/thisismegant~google-maps-places-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-thisismegant-google-maps-places-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/thisismegant~google-maps-places-scraper/runs": {
            "post": {
                "operationId": "runs-sync-thisismegant-google-maps-places-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/thisismegant~google-maps-places-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-thisismegant-google-maps-places-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keyword",
                    "locations"
                ],
                "properties": {
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword, for example: cafe, dentist, hotel, restaurant, hardware store."
                    },
                    "locations": {
                        "title": "Locations",
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "description": "One or more location names. Each location is combined with the keyword.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerLocation": {
                        "title": "Max results per location",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of Google Maps place detail pages to process for each location.",
                        "default": 1
                    },
                    "maxReviewsPerPlace": {
                        "title": "Max reviews per place",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Set to 0 to skip reviews.",
                        "default": 0
                    },
                    "language": {
                        "title": "Browser language",
                        "type": "string",
                        "description": "Browser locale used by Playwright.",
                        "default": "en-US"
                    },
                    "delaySeconds": {
                        "title": "Delay between detail pages",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Small polite delay between detail page visits.",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
