# 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 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

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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Scraper - Business Leads, Phone & Website Extractor",
        "description": "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.",
        "version": "0.1",
        "x-build-id": "p0lMvfARcG9GykSgY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraper_hub~google-maps-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraper_hub-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/scraper_hub~google-maps-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scraper_hub-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/scraper_hub~google-maps-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scraper_hub-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",
                "properties": {
                    "queries": {
                        "title": "Search queries",
                        "type": "array",
                        "description": "One or more Google Maps searches, e.g. 'restaurants in New York'. Leave empty if you use the Country option below.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results per search",
                        "type": "integer",
                        "description": "Google returns up to ~120 results per search. Leave at 120 for the maximum.",
                        "default": 120
                    },
                    "lang": {
                        "title": "Language",
                        "type": "string",
                        "description": "Interface language code (hl), e.g. 'en', 'hi', 'es'.",
                        "default": "en"
                    },
                    "cities": {
                        "title": "Cities (optional — specific-city mode)",
                        "type": "array",
                        "description": "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.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "country": {
                        "title": "Country (optional — whole-country mode)",
                        "type": "string",
                        "description": "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": {
                        "title": "Business type (for Country or City mode)",
                        "type": "string",
                        "description": "The category to search in each city, e.g. 'dentists', 'gyms', 'mobile shops'. Required when using Cities or Country."
                    },
                    "maxCities": {
                        "title": "Max cities (for Country mode)",
                        "type": "integer",
                        "description": "Limit how many cities to cover. Leave empty for all cities in the country."
                    },
                    "randomizeCities": {
                        "title": "Randomize city order",
                        "type": "boolean",
                        "description": "Spread results across different areas instead of always starting from the same cities.",
                        "default": true
                    },
                    "coordinates": {
                        "title": "Coordinates (optional)",
                        "type": "string",
                        "description": "Anchor the search to a point as 'lat, lng', e.g. '27.1767, 78.0081'."
                    },
                    "zoom": {
                        "title": "Zoom level",
                        "type": "integer",
                        "description": "Map zoom 1-21 used with Coordinates. Higher = tighter area.",
                        "default": 14
                    },
                    "deepExtraction": {
                        "title": "Deep extraction (website + full address for ALL results)",
                        "type": "boolean",
                        "description": "Visits each place page to fetch the website and full address for every result, not just the first ~20. Slower but more complete.",
                        "default": false
                    },
                    "gridSize": {
                        "title": "Street-level depth / grid size (1 = normal ~120 cap)",
                        "type": "integer",
                        "description": "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).",
                        "default": 1
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "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.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    },
                    "enableReviews": {
                        "title": "Extract individual reviews",
                        "type": "boolean",
                        "description": "Also scrape reviews for each place (slower).",
                        "default": false
                    },
                    "maxReviews": {
                        "title": "Max reviews per place",
                        "type": "integer",
                        "description": "Only used when 'Extract individual reviews' is on. Leave empty for all."
                    },
                    "reviewsSort": {
                        "title": "Reviews sort order",
                        "enum": [
                            "newest",
                            "most_relevant",
                            "highest_rating",
                            "lowest_rating"
                        ],
                        "type": "string",
                        "description": "How to sort the extracted reviews (only used when 'Extract individual reviews' is on).",
                        "default": "newest"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
