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

📍 Scrape business listings from Google Maps by keyword and location. Extract names, addresses, phone numbers, websites, ratings, coordinates, and more — perfect for lead generation, local SEO, and competitor research.

- **URL**: https://apify.com/damilo/google-maps-scraper.md
- **Developed by:** [Imad](https://apify.com/damilo) (community)
- **Categories:** Lead generation, Travel
- **Stats:** 425 total users, 36 monthly users, 97.6% runs succeeded, 10 bookmarks
- **User rating**: 4.92 out of 5 stars

## Pricing

$3.00 / 1,000 results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🗺️ Google Maps Scraper

✅ If this actor saved you time, a ⭐⭐⭐⭐⭐ review helps me keep improving!

Scrape local business listings from Google Maps by keyword and location. Get structured data like names, addresses, phone numbers, websites, ratings, and more — all without needing a Google Maps API key.

***

### 📚 Table of Contents

- [Features](#features)
- [Input Parameters](#input-parameters)
- [Example Input](#example-input)
- [Output](#output)
- [Limitations & Notes](#limitations--notes)
- [Why Choose This Scraper?](#why-choose-this-scraper)
- [Support](#support)

***

### 🚀 Features

- Search by keyword and city, town, or address
- Get rich business data: phone, address, rating, hours, etc.
- Works worldwide in over 100 languages
- No need for a Google API key
- Structured output ready for download or integration
- Paginated scraping for up to hundreds of listings
- Supports optional Place ID and CID targeting

***

### 🧩 Input Parameters

![Inputs](./assets/input.png)
| Field | Type | Description |
| ------------- | ------- | -------------------------------------------- |
| `query` | string | What to search for (e.g. `"coffee shops"`) |
| `location` | string | Where to search (e.g. `"London"`) |
| `place_id` | string | (Optional) Google Maps Place ID |
| `cid` | string | (Optional) Google Maps CID |
| `language` | string | Language for results (default: `"en"`) |
| `max_results` | integer | How many listings to scrape (default: `100`) |

***

### 💡 Example Input

```json
{
  "query": "bookstore",
  "location": "Berlin",
  "language": "de",
  "max_results": 50
}
```

***

### 📦 Output

Each result includes:
![Output](./assets/output.png)

- `title` – Business name
- `address` – Full address
- `phoneNumber` – Contact number
- `website` – Business website
- `latitude`, `longitude` – Location coordinates
- `rating`, `ratingCount` – Review data
- `openingHours` – Weekly opening hours
- `types`, `type` – Business categories
- `thumbnailUrl` – Image from Google Maps
- `placeId`, `cid` – Google’s internal identifiers

Data is saved to the Apify dataset. You can download it in formats like JSON, CSV, Excel, or access it via API.

***

### ⚠️ Limitations & Notes

- Avoid overly generic queries like “restaurant” without a specific location — Google may return restricted or incomplete data.
- Be mindful of scraping volumes to avoid being rate-limited by the data source.

***

### 🌟 Why Choose This Scraper?

- Easy to use — no setup or coding required
- Great for lead generation and local SEO
- Much faster than collecting data manually
- Doesn’t require a Google Maps API key
- Output is clean, reliable, and structured
- Built on Apify for automation and scalability

***

### 🛟 Support

If you have questions, feature requests, or run into issues, feel free to reach out through the **"Issues"** section.

If this actor saved you time, a ⭐⭐⭐⭐⭐ review would mean a lot!

***

Happy scraping!

# Actor input Schema

## `query` (type: `string`):

Define search query

## `location` (type: `string`):

Define location

## `place_id` (type: `string`):

Google Maps Place ID for the location

## `cid` (type: `string`):

Search by Google Maps CID (Customer Identification)

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

The language to search in.

## `max_results` (type: `integer`):

The maximum number of results to scrape.

## Actor input object example

```json
{
  "query": "restaurant",
  "location": "San Francisco, CA, USA",
  "language": "en",
  "max_results": 100
}
```

# 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 = {
    "query": "restaurant",
    "location": "San Francisco, CA, USA",
    "language": "en",
    "max_results": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("damilo/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 = {
    "query": "restaurant",
    "location": "San Francisco, CA, USA",
    "language": "en",
    "max_results": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("damilo/google-maps-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "restaurant",
  "location": "San Francisco, CA, USA",
  "language": "en",
  "max_results": 100
}' |
apify call damilo/google-maps-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,damilo/google-maps-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nszSu8qnoYxWpHMB0/builds/VNtbxMQbdlQdDj2Ce/openapi.json
