# Google Maps Email Extractor MCP (`red.cars/google-maps-email-mcp`) Actor

Extract business emails from Google Maps searches — find businesses by location/category, scrape their websites, and extract contact emails. Built as MCP standby actor.

- **URL**: https://apify.com/red.cars/google-maps-email-mcp.md
- **Developed by:** [AutomateLab](https://apify.com/red.cars) (community)
- **Categories:** AI, Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN 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 Email Extractor MCP

Extract business email addresses from Google Maps searches — find businesses by location and category, visit their websites, and pull out contact emails. Built as an Apify MCP (Model Context Protocol) standby actor for AI agents and LLM integrations.

[Apify Store Listing](https://apify.com/red.cars/google-maps-email-mcp)

### What does this actor do?

Two-step pipeline: first search Google Maps for businesses by query and location, then scrape each business website for contact email addresses. Returns structured JSON with business info and any emails found.

The actor runs as an **MCP standby actor** — it stays idle until called via the MCP JSON-RPC protocol, then returns results directly. It's also usable as a standard batch Apify actor with JSON input.

### Why use this actor?

- **B2B lead generation** — Build prospect lists with verified contact emails by category and territory
- **Sales outreach** — Find decision-maker emails for businesses in a target market
- **Market research** — Map competitor presence and extract contact infrastructure
- **Business discovery** — Find all businesses of a type in a neighborhood and get their contact info
- **Due diligence** — Identify contact patterns and email infrastructure for counterparty research

### Tools

| Tool | Price | Description |
|------|-------|-------------|
| `search_businesses` | $0.03 | Search Google Maps by query, returns name/address/placeId |
| `get_business_website` | $0.05 | Get website URL for a specific Google Maps place ID |
| `extract_emails_from_website` | $0.05 | Scrape a website and extract all contact emails |
| `search_and_extract_emails` | $0.10 | Full pipeline: search → find website → scrape emails |

### How to use

#### MCP Protocol (AI agents)

Send a JSON-RPC POST to `/mcp` with:

```json
{
  "method": "tools/call",
  "params": {
    "name": "search_and_extract_emails",
    "arguments": {
      "search_query": "restaurants in Manhattan",
      "max_results": 10
    }
  }
}
````

#### Apify Batch Mode

```bash
apify call red.cars/google-maps-email-mcp \
  --input '{"tool": "search_and_extract_emails", "params": {"search_query": "manufacturers in Shenzhen", "max_results": 5}}'
```

#### JavaScript / TypeScript

```javascript
const { handleRequest } = await import('./dist/main.js');

const result = await handleRequest({
  toolName: 'search_and_extract_emails',
  arguments: { search_query: 'plumbers in Brooklyn', max_results: 10 }
});
console.log(JSON.parse(result.content[0].text));
```

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `tool` | string | Yes | One of: `search_businesses`, `get_business_website`, `extract_emails_from_website`, `search_and_extract_emails` |
| `search_query` | string | For search tools | Google Maps search query (e.g., "restaurants in NYC") |
| `place_id` | string | For details tool | Google Maps place ID from a search result |
| `website_url` | string | For email extraction | Business website URL to scrape |
| `max_results` | integer | No | Max results to return (1-50, default 10) |
| `max_pages` | integer | No | Max sub-pages to crawl per website (1-10, default 3) |

### Output

#### search\_businesses

```json
{
  "query": "restaurants in Manhattan",
  "count": 5,
  "businesses": [
    {
      "name": "Joe's Pizza",
      "address": "123 Smith St, New York, NY",
      "website": null,
      "placeId": "ChIJ8fz2XcJZwok...",
      "emails": [],
      "source": "google_maps_search"
    }
  ]
}
```

#### search\_and\_extract\_emails

```json
{
  "query": "restaurants in Manhattan",
  "count": 3,
  "businesses": [
    {
      "name": "Joe's Pizza",
      "address": "123 Smith St, New York, NY",
      "website": "https://joespizza.com",
      "placeId": "ChIJ8fz2XcJZwok...",
      "emails": ["contact@joespizza.com", "info@joespizza.com"],
      "source": "google_maps_search"
    }
  ]
}
```

#### extract\_emails\_from\_website

```json
{
  "website": "https://example.com",
  "pages_crawled": 3,
  "emails": ["contact@example.com", "jobs@example.com"],
  "by_page": [
    { "page": "https://example.com", "emails": ["contact@example.com"] },
    { "page": "https://example.com/contact", "emails": ["contact@example.com", "jobs@example.com"] }
  ]
}
```

### Cost estimation

Pricing is **per tool call**, not per result:

| Tool | Price | Notes |
|------|-------|-------|
| `search_businesses` | $0.03 | Google Maps search only, no email extraction |
| `get_business_website` | $0.05 | Per placeId — extract website URL only |
| `extract_emails_from_website` | $0.05 | Website scrape, multi-page crawl |
| `search_and_extract_emails` | $0.10 | Full pipeline, one price |

**Cost tip:** Use `search_businesses` ($0.03) first to see which businesses have websites, then selectively call `extract_emails_from_website` ($0.05) for the ones you need.

### Tips

- **`search_and_extract_emails` max\_results=20** is the practical maximum per call — each business requires sequential website visits
- **Contact pages yield the most emails** — the scraper prioritizes /contact, /about, /team pages
- **No Google API key needed** — uses headless browser to scrape Google Maps directly
- **Sequential processing** — websites are processed one at a time to avoid timeouts; partial results are returned on timeout

### FAQ

**Is this legal?**
Scrapes publicly available business contact information from Google Maps and business websites. Ensure your use case complies with Google's Terms of Service and applicable laws. Do not use for spam or unsolicited marketing.

**Why do some businesses have no emails?**
Not all businesses list contact emails on their website. Some use contact forms instead. The scraper only extracts visible email addresses — it cannot submit forms.

**What happens if a website blocks the scraper?**
The actor will skip that website and continue with the next. Use Apify proxy rotation for higher volume.

**Does this need a Google API key?**
No. The actor uses a headless browser to scrape Google Maps directly, no API key required.

### Support

For issues or feature requests: [Apify Console](https://console.apify.com/actors/todo)

# Actor input Schema

## `tool` (type: `string`):

The tool to run

## `search_query` (type: `string`):

Google Maps search query (e.g., 'restaurants in NYC', 'manufacturers in Shenzhen')

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

Google Maps place ID

## `website_url` (type: `string`):

Business website URL to scrape for emails

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

Maximum number of businesses to process

## Actor input object example

```json
{
  "tool": "search_businesses",
  "search_query": "restaurants in Manhattan",
  "place_id": "",
  "website_url": "",
  "max_results": 10
}
```

# 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 = {
    "tool": "search_businesses",
    "search_query": "restaurants in Manhattan",
    "place_id": "",
    "website_url": "",
    "max_results": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("red.cars/google-maps-email-mcp").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 = {
    "tool": "search_businesses",
    "search_query": "restaurants in Manhattan",
    "place_id": "",
    "website_url": "",
    "max_results": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("red.cars/google-maps-email-mcp").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 '{
  "tool": "search_businesses",
  "search_query": "restaurants in Manhattan",
  "place_id": "",
  "website_url": "",
  "max_results": 10
}' |
apify call red.cars/google-maps-email-mcp --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Email Extractor MCP",
        "description": "Extract business emails from Google Maps searches — find businesses by location/category, scrape their websites, and extract contact emails. Built as MCP standby actor.",
        "version": "1.0",
        "x-build-id": "lHcm6rtO7Nw1XtQ4q"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/red.cars~google-maps-email-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-red.cars-google-maps-email-mcp",
                "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/red.cars~google-maps-email-mcp/runs": {
            "post": {
                "operationId": "runs-sync-red.cars-google-maps-email-mcp",
                "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/red.cars~google-maps-email-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-red.cars-google-maps-email-mcp",
                "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": [
                    "tool"
                ],
                "properties": {
                    "tool": {
                        "title": "Tool",
                        "enum": [
                            "search_businesses",
                            "get_business_website",
                            "extract_emails_from_website",
                            "search_and_extract_emails"
                        ],
                        "type": "string",
                        "description": "The tool to run",
                        "default": "search_businesses"
                    },
                    "search_query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Google Maps search query (e.g., 'restaurants in NYC', 'manufacturers in Shenzhen')",
                        "default": "restaurants in Manhattan"
                    },
                    "place_id": {
                        "title": "Place ID",
                        "type": "string",
                        "description": "Google Maps place ID",
                        "default": ""
                    },
                    "website_url": {
                        "title": "Website URL",
                        "type": "string",
                        "description": "Business website URL to scrape for emails",
                        "default": ""
                    },
                    "max_results": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of businesses to process",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
