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

🗺️ Google Maps Scraper extracts business listings, reviews, ratings & contact details from Google Maps fast. ⚡ Perfect for lead gen, local SEO, market research & competitor tracking. 📊 Export data for outreach with ease.

- **URL**: https://apify.com/scrapelabsapi/google-maps-scraper.md
- **Developed by:** [ScrapeLabs](https://apify.com/scrapelabsapi) (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

from $3.99 / 1,000 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/platform/actors/running/actors-in-store#pay-per-event

## 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-scraper

Bulk Google Maps scraper Actor with automatic proxy fallback (direct → datacenter → residential, sticky after residential), live dataset writes, optional review capture, and final `maps.json` in the Key-Value Store.

### Why Choose Us?
- Resilient proxy ladder with clear logging and stickiness after residential fallback
- Bulk inputs: locations, keywords/terms, direct Maps URLs
- Live dataset writes to avoid data loss; final merged `maps.json` in KV store
- Optional reviews per place with best-effort scraping
- Sorting options (rating, review_count, name, relevance)

### Key Features
- Grid-based viewport coverage per location for broader coverage
- Deduplication by `place_id`
- Configurable `maxResults`, `gridSize`, `maxComments`
- Detailed Apify logs for progress and proxy events

### Input
Example:
```json
{
  "locations": ["New York"],
  "keywords": ["coffee shops"],
  "urls": [],
  "sortOrder": "relevance",
  "maxComments": 0,
  "maxResults": 200,
  "gridSize": 15,
  "proxyConfiguration": { "useApifyProxy": false }
}
````

Fields:

- `locations` (array): City/region names for viewport generation. Optional if `urls` provided.
- `keywords` (array, required): Keywords/terms to search.
- `urls` (array): Direct Google Maps search URLs (bulk supported).
- `sortOrder` (string): `relevance` | `rating` | `review_count` | `distance` | `name`.
- `maxComments` (integer): Reviews per place (0 disables reviews).
- `maxResults` (integer): Cap on total places.
- `gridSize` (integer): Grid dimension per viewport (coverage vs speed).
- `proxyConfiguration` (object): Defaults to direct. Actor will fallback to datacenter, then residential (sticky) on blocks.

### Output

- Dataset: one item per place with address, rating, reviews count, phone, tags, hours, lat/long, `place_id`, `success`.
- Key-Value Store: `maps.json` containing the final sorted list.

Sample item (dataset / maps.json):

```json
{
  "name": "Sample Coffee",
  "website": "https://samplecoffee.com",
  "avg_rating": 4.6,
  "total_reviews": 128,
  "street_address": "123 Main St",
  "city": "New York",
  "state": "NY",
  "zip": "10001",
  "country_code": "US",
  "full_address": "123 Main St New York NY 10001 US",
  "tags": ["Coffee shop"],
  "notes": null,
  "place_id": "abcd1234",
  "phone": "+1 212-555-0100",
  "lat": 40.75,
  "long": -73.99,
  "hours": [],
  "success": true
}
```

### 🚀 How to Use the Actor (via Apify Console)

1. Log in to https://console.apify.com and open the Actor.
2. Fill inputs: locations/keywords or URLs, set limits and sort order.
3. Leave proxy blank for direct start; actor auto-fallbacks to proxies on block.
4. Run and watch logs for grid progress and proxy events.
5. Results appear in DATASET; final merged file in OUTPUT as `maps.json`.

### Best Use Cases

- Local business lead lists by category and city
- Competitive scans across regions
- Enriching place records with ratings/phones/addresses

### Frequently Asked Questions

- **Will it always get reviews?** Reviews are best-effort; set `maxComments>0` to enable.
- **What if Google blocks me?** Actor steps through direct → datacenter → residential (sticky) with retries; logs each change.
- **How many results can I fetch?** Up to `maxResults`; gridSize controls coverage vs. speed.

### Support and Feedback

For questions or custom needs, reach out via the contact in `actor.json` description.

### Cautions

- Data is collected from public Google Maps pages.
- Ensure compliance with local laws and Google’s terms; you are responsible for usage.

# Actor input Schema

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

🏙️ Examples: *New York*, *Texas*, *Downtown Chicago* — mix and match for bulk coverage.

## `keywords` (type: `array`):

☕ Describe the businesses or places you care about — *coffee shops*, *dentists*, *coworking*, *hotels near airport*, and so on. 📝 Add many keywords to multiply your searches!

## `urls` (type: `array`):

🌐 Bulk-friendly list of map links. ✨ Great when you’ve bookmarked exact searches.

## `maxResults` (type: `integer`):

🔢 Total unique places across **all** locations, keywords, and URLs (duplicates are merged automatically). ✨ Default is friendly for quick tests; raise it for big lists.

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

🎛️ Optional Apify Proxy — leave off for simple runs; turn on for heavier jobs or picky networks.

## Actor input object example

```json
{
  "locations": [
    "New York"
  ],
  "keywords": [
    "coffee shops"
  ],
  "urls": [],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": 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 = {
    "locations": [
        "New York"
    ],
    "keywords": [
        "coffee shops"
    ],
    "urls": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapelabsapi/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 = {
    "locations": ["New York"],
    "keywords": ["coffee shops"],
    "urls": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapelabsapi/google-maps-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 '{
  "locations": [
    "New York"
  ],
  "keywords": [
    "coffee shops"
  ],
  "urls": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapelabsapi/google-maps-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Scraper",
        "description": "🗺️ Google Maps Scraper extracts business listings, reviews, ratings & contact details from Google Maps fast. ⚡ Perfect for lead gen, local SEO, market research & competitor tracking. 📊 Export data for outreach with ease.",
        "version": "0.1",
        "x-build-id": "Ddsd1g1Fyyt4eJca0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapelabsapi~google-maps-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapelabsapi-google-maps-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/scrapelabsapi~google-maps-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapelabsapi-google-maps-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/scrapelabsapi~google-maps-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapelabsapi-google-maps-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": [
                    "keywords"
                ],
                "properties": {
                    "locations": {
                        "title": "📍 Cities, regions, or neighborhoods",
                        "type": "array",
                        "description": "🏙️ Examples: *New York*, *Texas*, *Downtown Chicago* — mix and match for bulk coverage.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "🔎 What to find (keywords)",
                        "type": "array",
                        "description": "☕ Describe the businesses or places you care about — *coffee shops*, *dentists*, *coworking*, *hotels near airport*, and so on. 📝 Add many keywords to multiply your searches!",
                        "items": {
                            "type": "string"
                        }
                    },
                    "urls": {
                        "title": "🔗 Optional: Google Maps links",
                        "type": "array",
                        "description": "🌐 Bulk-friendly list of map links. ✨ Great when you’ve bookmarked exact searches.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "🎯 How many places to collect",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "🔢 Total unique places across **all** locations, keywords, and URLs (duplicates are merged automatically). ✨ Default is friendly for quick tests; raise it for big lists.",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "🌐 Connection & reliability",
                        "type": "object",
                        "description": "🎛️ Optional Apify Proxy — leave off for simple runs; turn on for heavier jobs or picky networks."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
