# Google Maps Scraper with Emails (`pheidias0/google-maps-scraper-with-emails`) Actor

Scrapes Google Maps for any search query in any country. Extracts business name, phone, email, website, address, category, and rating. Visits each place's website to find email addresses. Built for mass scraping.

- **URL**: https://apify.com/pheidias0/google-maps-scraper-with-emails.md
- **Developed by:** [Ayoub Mansouri](https://apify.com/pheidias0) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 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 with Emails & Phone Numbers

Extract business leads from Google Maps at scale. Get **name, phone, email, address, rating, website, and social media links** for any business type in any location worldwide.

### Why this scraper?

- **Breaks the 120-result limit** — Uses geo-grid technology to split large areas into cells and scrape each one, finding thousands of businesses instead of Google's default 120 cap.
- **Finds emails other scrapers miss** — Crawls business websites, scans contact/about pages, and extracts emails hidden inside contact forms (mailto actions, hidden inputs, inline scripts).
- **Extracts social media profiles** — Facebook, Instagram, Twitter/X, LinkedIn pulled from business websites automatically.
- **Fast 3-phase pipeline** — Phase 1: bulk extraction from search feed. Phase 2: parallel HTTP enrichment for email + social (no browser overhead). Phase 3: targeted browser visits only where needed for phone numbers.
- **Cost-optimized** — Website crawling uses direct HTTP (no proxy cost). Resource blocking cuts Google Maps bandwidth by ~70%. Only opens browser tabs when strictly necessary.
- **Crash recovery** — State persists across Apify migrations. Large runs resume exactly where they left off.

### What you get

| Field | Example |
|-------|---------|
| `name` | John's Plumbing & Drain Services |
| `category` | Plumber |
| `phone` | +1 323-422-7485 |
| `email` | info@johnsplumber.com |
| `website` | https://johnsplumber.com/ |
| `address` | 1247 Riverside Dr, Los Angeles, CA 90039 |
| `city` | Los Angeles |
| `state` | CA |
| `zip` | 90039 |
| `rating` | 4.9 |
| `reviewsCount` | 53 |
| `facebook` | https://www.facebook.com/johnsplumbing |
| `instagram` | https://www.instagram.com/johnsplumbing/ |
| `twitter` | https://twitter.com/johnsplumbing |
| `linkedin` | https://www.linkedin.com/company/johnsplumbing |
| `googleMapsUrl` | https://www.google.com/maps/place/... |

### Input examples

#### Simple search — one keyword, one city

```json
{
    "searchStringsArray": ["dentist"],
    "locationQuery": "Chicago"
}
````

#### Multiple keywords — lead generation campaign

```json
{
    "searchStringsArray": [
        "plumber",
        "electrician",
        "HVAC contractor",
        "roofer"
    ],
    "locationQuery": "Houston, TX",
    "scrapeEmails": true,
    "skipClosedPlaces": true
}
```

#### International — any language, any country

```json
{
    "searchStringsArray": ["restaurant", "café"],
    "locationQuery": "Paris",
    "language": "fr"
}
```

#### Mass scraping — cover an entire metro area

```json
{
    "searchStringsArray": ["therapist", "psychologist", "counselor"],
    "locationQuery": "New York City",
    "maxCrawledPlacesPerSearch": 0,
    "maxConcurrency": 5
}
```

The geo-grid automatically splits the area into ~30 cells at the optimal zoom level, scraping each one to find every listing.

#### Location baked into keywords

```json
{
    "searchStringsArray": [
        "dentist Chicago",
        "dentist Houston",
        "dentist Phoenix"
    ],
    "scrapeEmails": true
}
```

#### Fast mode — skip email extraction

```json
{
    "searchStringsArray": ["gym", "fitness"],
    "locationQuery": "Miami",
    "scrapeEmails": false
}
```

Runs significantly faster. You still get name, phone, address, category, rating, and website.

### How email extraction works

The scraper uses a 3-step pipeline to maximize email discovery:

1. **Homepage scan** — Visits the business website via fast HTTP request. Uses Crawlee's `social.parseHandlesFromHtml` to find mailto links, email patterns, phone numbers, and social media profiles.
2. **Contact form extraction** — Scans for hidden emails inside `<form>` elements: `action="mailto:..."`, hidden input values, data attributes, and inline script configurations (catches WordPress Contact Form 7, Formspree, and similar setups).
3. **Sub-page crawl** — If no email found on the homepage, automatically discovers and scans contact/about pages on the same domain.

This catches emails that basic scrapers miss — many businesses only expose their email inside a contact form, not as visible text on the page.

### How the geo-grid works

Google Maps only returns ~120 results per search. To get full coverage of a city or region:

1. The actor geocodes your location into a bounding box (via OpenStreetMap Nominatim)
2. It picks the optimal zoom level based on the area size
3. It splits the bounding box into a grid of cells
4. Each cell gets its own Google Maps search, finding results in that specific area
5. Results are automatically deduplicated by Google Maps place ID

For a city like New York, this creates ~30 cells and can find 500+ unique businesses per keyword.

### Tips for getting the most results

- **Use multiple related keywords** — "plumber", "plumbing service", "emergency plumber" will each find some unique listings
- **Set maxCrawledPlacesPerSearch to 0** — No limit per grid cell means maximum coverage
- **Increase maxConcurrency to 5-10** for faster runs (default is 5)
- **Deduplication is automatic** — The same business found across multiple keywords or grid cells is only included once

### Input reference

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchStringsArray` | string\[] | *required* | Keywords to search on Google Maps |
| `locationQuery` | string | — | City, region, or country. Auto-geocoded into a geo-grid |
| `startUrls` | object\[] | — | Google Maps URLs to scrape directly |
| `maxCrawledPlacesPerSearch` | integer | `0` | Max results per grid cell. 0 = no limit |
| `placeMinimumStars` | number | `0` | Minimum star rating filter (0-5) |
| `skipClosedPlaces` | boolean | `false` | Skip closed businesses |
| `scrapeEmails` | boolean | `true` | Extract emails and social media from websites |
| `language` | string | `"en"` | Google Maps language code |
| `maxConcurrency` | integer | `5` | Parallel browser pages (3-10 recommended) |
| `zoom` | integer | `0` | Geo-grid zoom. 0 = auto-detect |

### Export

Download results from the Apify console as **CSV**, **JSON**, or **Excel**. Connect to Google Sheets, Slack, CRMs, or webhooks via Apify integrations.

### Cost

Pay Per Event: **$0.005 per place** ($5 per 1,000 results).

# Actor input Schema

## `searchStringsArray` (type: `array`):

What to search on Google Maps (e.g. 'plumber', 'dentist', 'restaurant'). Each keyword will be searched at every grid cell in the location area.

## `locationQuery` (type: `string`):

City, region, or country to search in. The actor geocodes this into a bounding box and splits it into a geo-grid so it can find thousands of results instead of Google's 120 limit. Leave empty if your keywords already include locations.

## `startUrls` (type: `array`):

Optional. Paste Google Maps place or search URLs directly instead of using keywords.

## `maxCrawledPlacesPerSearch` (type: `integer`):

Max places to extract per grid cell or search. Set to 0 for no limit. With geo-grid, each cell can return up to ~120 places — the grid gives you coverage across the whole area.

## `placeMinimumStars` (type: `number`):

Only include places with this rating or higher. Set to 0 to include all.

## `skipClosedPlaces` (type: `boolean`):

Skip places marked as permanently or temporarily closed.

## `scrapeEmails` (type: `boolean`):

Visit each place's website via fast HTTP to extract email, Facebook, Instagram, Twitter, LinkedIn. Uses Crawlee social utilities + contact form extraction.

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

Language for Google Maps ('en', 'fr', 'es', 'de', 'ar', 'ja', etc.).

## `maxConcurrency` (type: `integer`):

Parallel browser pages. Higher = faster. With geo-grid you want 5-10 for speed. Safe range: 3-10.

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

Controls geo-grid density. 0 = auto-detect from location size. Lower zoom (11-12) = fewer larger cells, faster but may miss places. Higher zoom (14-15) = more smaller cells, slower but more thorough.

## Actor input object example

```json
{
  "searchStringsArray": [
    "dentist"
  ],
  "locationQuery": "Brooklyn, NY",
  "maxCrawledPlacesPerSearch": 50,
  "placeMinimumStars": 0,
  "skipClosedPlaces": false,
  "scrapeEmails": true,
  "language": "en",
  "maxConcurrency": 5,
  "zoom": 0
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped business listings with name, phone, email, address, rating, website, and social media links. Download as CSV, JSON, or Excel.

# 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 = {
    "searchStringsArray": [
        "dentist"
    ],
    "locationQuery": "Brooklyn, NY"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pheidias0/google-maps-scraper-with-emails").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 = {
    "searchStringsArray": ["dentist"],
    "locationQuery": "Brooklyn, NY",
}

# Run the Actor and wait for it to finish
run = client.actor("pheidias0/google-maps-scraper-with-emails").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 '{
  "searchStringsArray": [
    "dentist"
  ],
  "locationQuery": "Brooklyn, NY"
}' |
apify call pheidias0/google-maps-scraper-with-emails --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Scraper with Emails",
        "description": "Scrapes Google Maps for any search query in any country. Extracts business name, phone, email, website, address, category, and rating. Visits each place's website to find email addresses. Built for mass scraping.",
        "version": "0.1",
        "x-build-id": "0sXlgtUa10QdJwnaV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/pheidias0~google-maps-scraper-with-emails/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-pheidias0-google-maps-scraper-with-emails",
                "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/pheidias0~google-maps-scraper-with-emails/runs": {
            "post": {
                "operationId": "runs-sync-pheidias0-google-maps-scraper-with-emails",
                "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/pheidias0~google-maps-scraper-with-emails/run-sync": {
            "post": {
                "operationId": "run-sync-pheidias0-google-maps-scraper-with-emails",
                "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": [
                    "searchStringsArray"
                ],
                "properties": {
                    "searchStringsArray": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "What to search on Google Maps (e.g. 'plumber', 'dentist', 'restaurant'). Each keyword will be searched at every grid cell in the location area.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "locationQuery": {
                        "title": "Location",
                        "type": "string",
                        "description": "City, region, or country to search in. The actor geocodes this into a bounding box and splits it into a geo-grid so it can find thousands of results instead of Google's 120 limit. Leave empty if your keywords already include locations."
                    },
                    "startUrls": {
                        "title": "Google Maps URLs",
                        "type": "array",
                        "description": "Optional. Paste Google Maps place or search URLs directly instead of using keywords.",
                        "items": {
                            "type": "object"
                        }
                    },
                    "maxCrawledPlacesPerSearch": {
                        "title": "Max places per search",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Max places to extract per grid cell or search. Set to 0 for no limit. With geo-grid, each cell can return up to ~120 places — the grid gives you coverage across the whole area.",
                        "default": 50
                    },
                    "placeMinimumStars": {
                        "title": "Minimum star rating",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Only include places with this rating or higher. Set to 0 to include all.",
                        "default": 0
                    },
                    "skipClosedPlaces": {
                        "title": "Skip closed places",
                        "type": "boolean",
                        "description": "Skip places marked as permanently or temporarily closed.",
                        "default": false
                    },
                    "scrapeEmails": {
                        "title": "Scrape emails & social media from websites",
                        "type": "boolean",
                        "description": "Visit each place's website via fast HTTP to extract email, Facebook, Instagram, Twitter, LinkedIn. Uses Crawlee social utilities + contact form extraction.",
                        "default": true
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Language for Google Maps ('en', 'fr', 'es', 'de', 'ar', 'ja', etc.).",
                        "default": "en"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Parallel browser pages. Higher = faster. With geo-grid you want 5-10 for speed. Safe range: 3-10.",
                        "default": 5
                    },
                    "zoom": {
                        "title": "Zoom level (0 = auto)",
                        "minimum": 0,
                        "maximum": 17,
                        "type": "integer",
                        "description": "Controls geo-grid density. 0 = auto-detect from location size. Lower zoom (11-12) = fewer larger cells, faster but may miss places. Higher zoom (14-15) = more smaller cells, slower but more thorough.",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
