# Google Maps Scraper - Business Leads, Phone & Website Extractor (`scraper_hub/google-maps-scraper`) Actor

Extract business leads from Google Maps at scale. Get name, phone, website, full address, rating & reviews for any category - in any city or entire country.

- **URL**: https://apify.com/scraper\_hub/google-maps-scraper.md
- **Developed by:** [cashify](https://apify.com/scraper_hub) (community)
- **Categories:** Lead generation, Business, Automation
- **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 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 Scraper

Extract business leads from Google Maps at scale — for any business category, in any city or country.

For every business you get: **name, category, full address, phone number, website, rating, review count, coordinates, Google Maps link, place ID**, and (for the first page of each search) hours and featured reviews.

***

### Features

- **Search by keyword** — e.g. `restaurants in New York`, `dentists in London`.
- **Search a whole country** — pick a country + business type and it fans out across every city.
- **Search specific coordinates + zoom** — target a precise area.
- **Up to ~120 results per search** (Google's own cap), with all core contact fields.
- **Human-like scraping** — randomized scroll speed and jitter, rate limiting, and automatic retry on blocks to stay under the radar.
- **Web UI + REST API** — run it from the browser or integrate it into your own apps.
- **Export** to CSV / Excel / JSON.

### Requirements

- Python 3.10+
- Node.js 18+ (for the web UI)
- Google Chrome

### Install & Run

```bash
## 1. Python backend
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt

## 2. Web UI (first time only)
python run.py install

## 3. Start (backend :8000 + UI :3000)
python run.py
```

Then open <http://localhost:3000>, enter a search, and press **Run**.

To run only the REST API (no UI):

```bash
python run.py backend
```

### REST API

Create a scrape task:

```http
POST http://localhost:8000/api/tasks/create-task-async
Content-Type: application/json

{
  "scraper_name": "google_maps_scraper",
  "data": {
    "queries": ["mobile shops in Agra"],
    "country": null,
    "business_type": "",
    "max_cities": null,
    "max_results": 120,
    "lang": "en",
    "coordinates": "",
    "zoom_level": 14,
    "enable_reviews_extraction": false,
    "max_reviews": null,
    "reviews_sort": "newest",
    "api_key": ""
  }
}
```

Country-wide example (all cities in India, 50 per city):

```json
{ "country": "IN", "business_type": "gyms", "max_cities": null, "max_results": 50, "queries": [] }
```

Fetch results: `POST /api/tasks/<id>/results` · Download: `POST /api/tasks/<id>/download`.

See [fields.md](fields.md) for the full list of output fields and [advanced.md](advanced.md) for advanced options.

### Legal

This tool is for educational and lawful data-collection purposes only. You are responsible for complying with Google's Terms of Service and applicable data-protection / privacy laws in your jurisdiction when using it.

# Actor input Schema

## `queries` (type: `array`):

One or more Google Maps searches, e.g. 'restaurants in New York'. Leave empty if you use the Country option below.

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

Google returns up to ~120 results per search. Leave at 120 for the maximum.

## `lang` (type: `string`):

Interface language code (hl), e.g. 'en', 'hi', 'es'.

## `cities` (type: `array`):

Scrape specific cities. Enter one or more city names and set 'Business type' below, e.g. cities = \["Jaipur","Pune"], businessType = "hotels". Ignored if Country is set.

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

ISO country code (e.g. 'US', 'IN', 'GB'). When set, the scraper searches 'Business type' across every city in the country and ignores Queries and Cities.

## `businessType` (type: `string`):

The category to search in each city, e.g. 'dentists', 'gyms', 'mobile shops'. Required when using Cities or Country.

## `maxCities` (type: `integer`):

Limit how many cities to cover. Leave empty for all cities in the country.

## `randomizeCities` (type: `boolean`):

Spread results across different areas instead of always starting from the same cities.

## `coordinates` (type: `string`):

Anchor the search to a point as 'lat, lng', e.g. '27.1767, 78.0081'.

## `zoom` (type: `integer`):

Map zoom 1-21 used with Coordinates. Higher = tighter area.

## `deepExtraction` (type: `boolean`):

Visits each place page to fetch the website and full address for every result, not just the first ~20. Slower but more complete.

## `gridSize` (type: `integer`):

Google caps a single search at ~120 results. Set to 3 (3x3=9 tiles) or 5 (25 tiles) to split the area into zoomed-in tiles and pull street-level data far beyond 120. Higher = many more results but much slower — use proxies. Multiplies work per search (and per city in Country mode).

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

Route the scraper through Apify Proxy to avoid Google blocks / IP bans. RESIDENTIAL proxies are strongly recommended, especially for large or street-level (grid) runs.

## `enableReviews` (type: `boolean`):

Also scrape reviews for each place (slower).

## `maxReviews` (type: `integer`):

Only used when 'Extract individual reviews' is on. Leave empty for all.

## `reviewsSort` (type: `string`):

How to sort the extracted reviews (only used when 'Extract individual reviews' is on).

## Actor input object example

```json
{
  "queries": [
    "restaurants in New York"
  ],
  "maxResults": 120,
  "lang": "en",
  "cities": [],
  "randomizeCities": true,
  "zoom": 14,
  "deepExtraction": false,
  "gridSize": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "enableReviews": false,
  "reviewsSort": "newest"
}
```

# 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 = {
    "queries": [
        "restaurants in New York"
    ],
    "maxResults": 120,
    "cities": [],
    "gridSize": 1,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper_hub/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 = {
    "queries": ["restaurants in New York"],
    "maxResults": 120,
    "cities": [],
    "gridSize": 1,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scraper_hub/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 '{
  "queries": [
    "restaurants in New York"
  ],
  "maxResults": 120,
  "cities": [],
  "gridSize": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scraper_hub/google-maps-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0oMQmVhg7qBKEDgyC/builds/p0lMvfARcG9GykSgY/openapi.json
