# Google Maps Crawler (`netleo/google-maps-crawler`) Actor

Google Maps Crawler extracts data about places and reviews from Google Maps. The actor can be used to find related places and reviews for a given starting place.

- **URL**: https://apify.com/netleo/google-maps-crawler.md
- **Developed by:** [netleo](https://apify.com/netleo) (community)
- **Categories:** Lead generation, Travel
- **Stats:** 104 total users, 2 monthly users, 100.0% runs succeeded, 26 bookmarks
- **User rating**: 1.90 out of 5 stars

## Pricing

$5.00 / 1,000 places

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/platform/actors/running/actors-in-store#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 Maps Crawler

### 🤖 What does Google Maps Crawler do?

Google Maps Crawler is an Apify actor that extracts data about places and reviews from Google Maps. The actor can be used to find related places and reviews for a given starting place.

The actor performs the following steps:

1. Searches for the starting place and downloads its data.
2. Downloads the latest or most relevant reviews for the starting place.
3. Goes through the reviews from step 2 and downloads latest reviews published by the given user. This helps discover other places that the user has visited and reviewed.
4. Downloads data about places related to the reviews from previous steps.

👤 By default reviews are not included in the output, but you can enable them by setting the `Include reviews` input parameter to `true`. You should only scrape personal data if you have a legitimate reason to do so, and you should also factor in Google's Terms of Use.

### 🤔 Why use Google Maps Crawler?

Google Maps Crawler can be used to:

- Crawl large number of places and reviews from Google Maps efficiently.
- Discover places that are related to a selected place.
- Understand the user base who have reviewed a selected place. This can help you understand the user base and their preferences.
- Gather leads or competitors for your business. For example, if you are a restaurant owner, you can use this actor to find users who have reviewed similar restaurants and target them with your marketing campaigns.

### 💵 How much will it cost me?

This actor returns 1000 related places for $5.00. This is a fixed price that covers platform usage fees. You are charged for the number of places returned, not the number of reviews downloaded. The actor will return unique list of places, so given that two users have reviewed the same place, it will be returned only once, saving you money.

Number of returned results can be tuned by the `Place Reviews Max`, `User Reviews Max` and `Related places details retrieval ratio in %` input parameters. Maximum number of returned results is product of these three parameters.

👉 Example: if you set `Place Reviews Max` to 500, `User Reviews Max` to 20 and `Related places details retrieval ratio in %` to 20, you will get 500 \* 20 \* 50% = 2000 related places. It will cost you $10.00.

### 📥 Input

Please provide the following input parameters:

- Place Name - name as seen on Google Maps
- Place Address - address as seen on Google Maps
- Place Reviews Max - maximum number of reviews to download for the starting place. Default is 50
- User Reviews Max - maximum number of reviews to download for each user. Default is 20
- Starting place reviews sorting order - sorting order of reviews for the starting place. Default is 'newest'. Can be 'newest' or 'most\_relevant'
- Related places details retrieval ratio in % - ratio of related places to download details for. Default is 100 - download details for all related places
- Include reviews - whether to include reviews in the output. Default is false

### 📤 Output

```json
{
  "google_maps_place_id": "ChIJaXQRs6lZwokRY6EFpJnhNNE",
  "google_maps_place_internal_id": "0x89c259a9b3117469:0xd134e199a405a163",
  "name": "Empire State Building",
  "address": "20 W 34th St., New York, NY 10001, United States",
  "phone": "+1 212-736-3100",
  "website": "esbnyc.com",
  "latitude": 40.7484405,
  "longitude": -73.98566439999999,
  "price_category": null,
  "average_rating": 4.7,
  "total_reviews": 107671,
  "categories": [
    "Historical landmark",
    "Historical place museum",
    "Observation deck",
    "Tourist attraction"
  ],
  "photos": [
    "https://lh5.googleusercontent.com/p/AF1QipNNqUbFH0T0J60lBOqffwoSum-YX2MVGGIJUKw1"
  ],
  "description": [
    "102-story landmark with observatories",
    "Iconic, art deco office tower from 1931 with exhibits & observatories on the 86th & 102nd floors."
  ],
  "is_claimed": true,
  "owner_id": "117951087160583633334",
  "similar_places": [
    {
      "name": "Empire state building entrance",
      "latitude": 40.755206799999996,
      "longitude": -73.9814244
    },
    ...
  ],
  "attributes": [
    "/geo/type/establishment_poi/has_onsite_services",
    ...
  ],
  "menu_url": null,
  "popular_times": [
    {
      "name": "Monday",
      "data": [
        14,
        0,
        0,
        ...
      ]
    }
  ],
  "time_wait": [],
  "has_current_popularity": true,
  "current_popularity": 35,
  "time_spent": [
    120,
    120
  ],
  "timezone": "America/New_York",
  "opening_hours": [
    {
      "day": "Saturday",
      "open_at_hour": 9,
      "open_at_minute": 0,
      "close_at_hour": 1,
      "close_at_minute": 0
    },
    ...
  ],
  "is_starting_place": true,
  "reviews": [
    {
      "user": {
        "google_maps_user_id": "117951087160583633334"
      },
      "review": {
        "rating": 5,
        "content": {
          "text": "Vistas magníficas da cidade.",
          "language": "pt",
          "translated_en": "Magnificent views of the city."
        },
        "answers": {
          "TTD_DAY_OF_VISIT": "Weekday",
          ...
        },
        "published_at_relative_human_readable": "an hour ago",
        "photos": [
          "AF1QipOA0XjGSoFvxumzU9kq1XXiqz0Cb36fsr8Q4QFO",
          ...
        ]
      },
      "response": {
        "content": {
          "text": null,
          "language": null,
          "translated_en": null
        },
        "published_at_relative_human_readable": null
      },
      "likes": 0,
      "created_at": "2024-08-24T15:31:34.898718"
    },
    ...
  ],
  "total_scrapped_reviews": 2
}
```

### ❓ FAQ

#### 👨‍⚖️ Is it legal to scrape Google Maps data?

Our scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our scrapers, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the legality of web scraping.

# Actor input Schema

## `name` (type: `string`):

Place name

## `address` (type: `string`):

Place address

## `placeReviewsMax` (type: `integer`):

Maximum number of reviews to get from the place

## `userReviewsMax` (type: `integer`):

Maximum number of reviews to get from each user

## `startingPlaceReviewsOrder` (type: `string`):

Sorting order of the place reviews. Recommended: newest

## `relatedPlacesDetailsRetrievalRatio` (type: `integer`):

Percentage of related places to get details from. By default, place details are retrieved from 100% of related places. If you want to get details for most frequently visited places only, set this value to 10-20%.

## `includeReviews` (type: `boolean`):

Enable to include reviews in the output. Reviews contain personal data

## Actor input object example

```json
{
  "name": "Empire State Building",
  "address": "20 W 34th St., New York, NY 10001, United States",
  "placeReviewsMax": 10,
  "userReviewsMax": 5,
  "startingPlaceReviewsOrder": "newest",
  "relatedPlacesDetailsRetrievalRatio": 20,
  "includeReviews": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("netleo/google-maps-crawler").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("netleo/google-maps-crawler").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 '{}' |
apify call netleo/google-maps-crawler --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/6ZekSqPleRTsYWjEs/builds/Fz9KwGlNJBKs9ck5o/openapi.json
