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

Extract business listings from Google Maps with a production-ready Apify Actor built on Playwright. The scraper supports intelligent scrolling, automatic proxy rotation, anti-detection techniques, optional detailed extraction, and exports clean, deduplicated business data.

- **URL**: https://apify.com/moving\_beacon-owner1/google-maps-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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/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 Scraper

Extract business listings from Google Maps with a production-ready Apify Actor built on Playwright. The scraper supports intelligent scrolling, automatic proxy rotation, anti-detection techniques, optional detailed extraction, and exports clean, deduplicated business data.

### Features

- 🚀 Fast Google Maps scraping using Playwright
- 🌍 Search businesses in any city or country
- 🔄 Automatic Apify proxy integration
- 🛡️ Anti-detection browser fingerprinting
- ♻️ Automatic retries with proxy rotation
- 📜 Intelligent scrolling with end-of-list detection
- 📍 Optional geographic search bias
- 📊 Configurable maximum results
- 🔍 Optional detailed business extraction
- 🧹 Automatic duplicate removal
- 📦 Clean JSON output

***

### Input

| Field              | Type    | Required | Description                                                             |
| ------------------ | ------- | -------- | ----------------------------------------------------------------------- |
| `search`           | String  | Yes      | Search query. Example: `"Coffee shops in New York"`                     |
| `max_results`      | Integer | No       | Maximum businesses to return. `0` = unlimited.                          |
| `max_scrolls`      | Integer | No       | Maximum scrolling iterations. Default: `50`.                            |
| `extract_detailed` | Boolean | No       | Visit each business page to collect additional information.             |
| `language`         | String  | No       | Google Maps language. Default: `en`.                                    |
| `geo_coordinates`  | String  | No       | Latitude and longitude to bias results (example: `"40.7128,-74.0060"`). |
| `zoom_level`       | Integer | No       | Initial Google Maps zoom level.                                         |
| `proxy`            | Object  | No       | Apify Proxy configuration.                                              |
| `max_retries`      | Integer | No       | Maximum retry attempts on failures.                                     |

#### Example Input

```json
{
  "search": "Restaurants in Chicago",
  "max_results": 100,
  "max_scrolls": 50,
  "extract_detailed": true,
  "language": "en"
}
```

***

### Output

Each business may include:

- Name
- Category
- Business Type
- Address
- Phone Number
- Website
- Rating
- Review Count
- Google Maps URL
- Latitude
- Longitude
- Opening Hours *(optional)*
- Price Level *(optional)*

#### Example Output

```json
{
  "category": "Restaurants",
  "name": "Joe's Pizza",
  "address": "123 Main St, Chicago, IL",
  "phone": "+1 312-555-1234",
  "website": "https://joespizza.com",
  "rating": "4.7",
  "reviews": "1832",
  "latitude": "41.8781",
  "longitude": "-87.6298",
  "place_url": "https://maps.google.com/...",
  "price_level": "$$",
  "hours": "Open ⋅ Closes 10 PM",
  "business_type": "Pizza Restaurant"
}
```

***

### How It Works

1. Launches a stealth Playwright browser.
2. Connects through an Apify proxy (optional).
3. Opens the requested Google Maps search.
4. Automatically scrolls until:

   - the requested number of results is reached,
   - the end of the results list is detected, or
   - the maximum scroll limit is reached.
5. Extracts visible business information.
6. Optionally visits each business page to collect additional details.
7. Removes duplicate businesses.
8. Stores the results in the Apify dataset.

***

### Proxy Support

Supports Apify Proxy, including:

- Residential proxies
- Datacenter proxies
- Session-based proxy rotation
- Automatic proxy rotation after failed requests

***

### Duplicate Removal

Businesses are automatically deduplicated using combinations of:

- Business name
- Address
- Phone number

***

### Best Use Cases

- Local business directories
- Lead generation
- Market research
- Competitor analysis
- Store locator datasets
- Sales prospecting
- Business intelligence
- Location-based analytics

***

### Notes

- Results depend on the data available in Google Maps.
- Some businesses may not provide all fields such as phone number, website, hours, or price level.
- Large searches may require additional time depending on the number of available listings.
- Use the scraper responsibly and ensure compliance with applicable laws and Google's Terms of Service.

# Actor input Schema

## `search` (type: `string`):

What to search on Google Maps. Use format: 'keyword in location' (e.g., 'restaurants in New York').

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

Maximum number of results to scrape. Set 0 for unlimited (scroll until end).

## `max_scrolls` (type: `integer`):

Maximum number of scroll attempts to load results.

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

Language code for Google Maps (e.g., en, es, de, fr).

## `geo_coordinates` (type: `string`):

Optional center point for the search, e.g. '40.7128,-74.0060'. Overrides location bias.

## `zoom_level` (type: `integer`):

Google Maps zoom level (1-21). Higher = more local results.

## `proxy` (type: `object`):

Apify proxy settings. Residential proxies recommended for best results.

## `max_retries` (type: `integer`):

How many times to retry on failure before giving up.

## `scroll_delay_min` (type: `number`):

Minimum delay between scrolls. Lower = faster but riskier.

## `scroll_delay_max` (type: `number`):

Maximum delay between scrolls.

## `extract_detailed` (type: `boolean`):

Click into each listing for extra details (hours, price level, etc.). Much slower but richer data.

## Actor input object example

```json
{
  "search": "restaurants in New York",
  "max_results": 100,
  "max_scrolls": 50,
  "language": "en",
  "zoom_level": 14,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "max_retries": 3,
  "scroll_delay_min": 1.5,
  "scroll_delay_max": 3.5,
  "extract_detailed": 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 = {
    "search": "restaurants in New York",
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/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 = {
    "search": "restaurants in New York",
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/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/owxXMqtbfrQreJ5T4/builds/EPhhcfuoFJqeycyLr/openapi.json
