# Google Maps Lead Enricher (`magnanimous_beehive/gmaps-lead-email-enricher`) Actor

- **URL**: https://apify.com/magnanimous_beehive/gmaps-lead-email-enricher.md
- **Developed by:** [sunny singh](https://apify.com/magnanimous_beehive) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 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 & B2B Email Extractor (Self-Healing Rust Engine)

**gmaps-lead-email-enricher** is a zero-maintenance, high-demand Apify Actor that scrapes Google Maps business listings and enriches every lead with verified B2B contact data — emails, phone numbers, WhatsApp links, and social profiles — using a compiled **Rust + PyO3** engine with **5 autonomous self-healing layers**.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?style=for-the-badge\&logo=apify)](https://console.apify.com/actors/)
[![Rust](https://img.shields.io/badge/engine-Rust%20%2B%20PyO3-black?style=for-the-badge\&logo=rust)](https://www.rust-lang.org/)
[![Playwright](https://img.shields.io/badge/discovery-Playwright-green?style=for-the-badge)](https://playwright.dev/)

***

### What it does

Given one or more Google Maps search queries (e.g. `"coffee shops in Austin"`, `"plumbers in Brooklyn"`, `"dentists in Miami"`), this Actor:

1. **Discovers businesses** on Google Maps via Playwright with a multi-selector DOM waterfall that auto-heals when Google changes its layout.
2. **Extracts** title, address, phone, website, rating, and review count for every place.
3. **Enriches contacts** by concurrently visiting each business website (`/`, `/contact`, `/about`) through a compiled Rust engine (tokio + reqwest + scraper) and pulls clean emails, phones, WhatsApp links (`wa.me`, `whatsapp.com`), and social profiles (Instagram, Facebook, LinkedIn, X/Twitter, YouTube, TikTok).
4. **Checkpoints incrementally** so a network drop never loses already-scraped leads, and isolates errors per website so one broken site never crashes a run.
5. **Attaches self-healing diagnostics** (`layer_used`, `healed_fields_count`, `enrichment_ms`) to every output row — you see exactly how each lead was healed in real time.

***

### Ideal for

- **B2B lead generation** — build targeted prospect lists from Google Maps
- **Local SEO & citation audits** — export NAP (name, address, phone) data
- **Email marketing** — extract business email addresses for outreach
- **WhatsApp marketing** — collect `wa.me` click-to-chat links
- **Market research** — compare ratings, review counts, and social presence across cities
- **Sales prospecting** — enrich CRM records with websites, phones, and socials

***

### Input fields

| Field | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | array of strings | `["coffee shops in Austin"]` | Google Maps search queries |
| `maxPlacesPerQuery` | integer | `20` | Max places to scrape per query |
| `enrichContactsFromWebsites` | boolean | `true` | Visit business websites to extract emails/phones/socials |
| `concurrency` | integer | `15` | Parallel browser workers |
| `proxyConfiguration` | object | Apify Proxy (auto) | Proxy configuration to avoid blocks |

***

### Output schema

One dataset row per business:

| Field | Description |
|---|---|
| `title` | Business name |
| `phone` | Phone number (Maps + website enrichment) |
| `emails` | De-obfuscated, cleaned email addresses |
| `whatsapp` | WhatsApp `wa.me` / `whatsapp.com` links |
| `website` | Business homepage (link) |
| `rating` | Google Maps star rating |
| `reviewsCount` | Number of Google reviews |
| `address` | Physical address |
| `socialLinks` | Instagram, Facebook, LinkedIn, X, YouTube, TikTok |
| `healing_diagnostics` | Self-healing proof: layer used, healed field count, enrichment ms |

***

### Example output row

```json
{
  "title": "Brew House Coffee",
  "phone": "+1 512-555-0199",
  "emails": ["info@brewhouse.com", "hello@brewhouse.com"],
  "whatsapp": ["https://wa.me/15125550199"],
  "website": "https://www.brewhouse.com",
  "rating": 4.7,
  "reviewsCount": 1240,
  "address": "123 Main St, Austin, TX 78701, USA",
  "socialLinks": ["https://instagram.com/brewhouse", "https://facebook.com/brewhouse"],
  "healing_diagnostics": {
    "layer_used": "layer1_dom_tier2_layer3_rust_layer4_checkpointed_layer5_diagnostics",
    "healed_fields_count": 3,
    "enrichment_ms": 342
  }
}
```

***

### 5-layer self-healing engine

| Layer | What it heals | How |
|---|---|---|
| **1. DOM Waterfall** | Google Maps layout/class changes | Cascades through primary CSS → semantic `role`/`aria`/`data-cid`/`href` → embedded state / innerText heuristics |
| **2. Proxy & Fingerprint** | 403/429, consent walls, empty feeds | Rotates User-Agents, viewports, Apify Proxy sessions with exponential backoff |
| **3. Rust Enricher** | Slow / memory-heavy contact extraction | tokio + reqwest + scraper fetches `/contact` + `/about` concurrently; compiled regex de-obfuscates `info [at] domain.com`, strips `mailto:`, filters image/sentry/wixpress false positives |
| **4. Checkpointing** | Network drops losing leads | `Actor.push_data()` batches; per-URL error isolation |
| **5. Diagnostics** | Opaque "did it work?" | `healing_diagnostics` on every item |

***

### Keywords

Google Maps Scraper, Google Maps Lead Generator, Google Places Scraper, Business Email Extractor, WhatsApp Lead Scraper, B2B Leads, Local SEO Leads, Map Scraper, Contact Enrichment, Lead Generation, Email Scraper, Phone Scraper, Social Profile Scraper, Apify Actor, Google Maps Business Extractor

***

### License

MIT

# Actor input Schema

## `searchQueries` (type: `array`):

Google Maps search queries (e.g. 'coffee shops in Austin', 'plumbers in Brooklyn').

## `maxPlacesPerQuery` (type: `integer`):

Maximum number of places to scrape per search query.

## `enrichContactsFromWebsites` (type: `boolean`):

When enabled, the Rust engine visits each business website (/contact, /about) to extract emails, phones, WhatsApp and social profiles.

## `concurrency` (type: `integer`):

Maximum number of parallel browser/context workers.

## `proxyConfiguration` (type: `object`):

Apify Proxy configuration used to rotate IPs and avoid Google Maps blocks.

## Actor input object example

```json
{
  "searchQueries": [
    "coffee shops in Austin",
    "plumbers in Brooklyn",
    "dentists in Miami"
  ],
  "maxPlacesPerQuery": 20,
  "enrichContactsFromWebsites": true,
  "concurrency": 15,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped and enriched business leads (one item per place).

# 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 = {
    "searchQueries": [
        "coffee shops in Austin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("magnanimous_beehive/gmaps-lead-email-enricher").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 = { "searchQueries": ["coffee shops in Austin"] }

# Run the Actor and wait for it to finish
run = client.actor("magnanimous_beehive/gmaps-lead-email-enricher").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 '{
  "searchQueries": [
    "coffee shops in Austin"
  ]
}' |
apify call magnanimous_beehive/gmaps-lead-email-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,magnanimous_beehive/gmaps-lead-email-enricher"
        }
    }
}
```

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/nKIqDokB5yK4AENq6/builds/5nNDKC0raB3TTNriu/openapi.json
