# Google Maps Contact & Email Enricher (CRM-Ready Leads) (`enezli/maps-contact-cleaner`) Actor

Cleans any Maps scraper's raw output into CRM-ready contacts: cross-source dedup & merge, E.164 phone/social normalization, email quality class (corporate / role / free / disposable) and a "who you can safely contact" confidence verdict. No subscription — pay per record.

- **URL**: https://apify.com/enezli/maps-contact-cleaner.md
- **Developed by:** [Turgay NANTA](https://apify.com/enezli) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 clean contacts

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 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 Contact Cleaner & Enricher — CRM-Ready Contacts

Turns a Google Maps scraper's **raw output into usable data**. This is **not** a scraper — it's the **quality layer** that runs *after* the scrape: it cleans, merges across sources, classifies email quality, and gives every contact a "who can I safely email" verdict. **No LLM, no API keys — fully deterministic.**

### What it does
Google Maps scrapers **extract** data but don't **clean** it: the same business shows up in 3 rows, phone formats are inconsistent, `info@` role accounts get mistaken for real people, and throwaway emails are never filtered out. This actor takes that output and turns it into a **clean, de-duplicated, confidence-labeled** contact list ready for your CRM.

### Input (any one of three)
| Field | Description |
|---|---|
| `records` | Raw business records (a Google Maps scraper dataset can be connected directly). `name`/`title`, `website`/`url`, `phone`, `emails`, `social` are auto-detected |
| `datasetId` | OR an Apify dataset ID holding the raw records to clean |
| `searchTerms` | OR, if you have no data yet, fetch it via an upstream Google Maps scraper (scraping is left to the upstream actor) |
| `liveMxCheck` | (Optional) live MX-record check for the best email's domain |

### Output (dataset, per record)
Each cleaned record carries English keys:

`name`, `website`, `phone` (E.164-style), `address`, `emails` (clean), `socials` (canonical), `email_classes`, `best_email` + `best_email_type`, **`contact_confidence`** (`SAFE` / `REVIEW` / `WEAK`) + `contact_confidence_reason`, `priority` (0–100), `socials_summary`. The final row `_summary` carries the run summary: `total_records`, `with_email`, `verdict_distribution`, `email_type_distribution`, `sendable_SAFE`, `reach_first_list`.

Email types: `corporate` · `free_provider` · `role_account` · `disposable` · `invalid`.

### Why this actor?
1. **Cross-source dedup + merge** — the same business becomes one rich record (fields are completed across sources via a multi-key union-find, so even website-only and email-only fragments that share a phone number merge correctly).
2. **Email quality classes** — role account / disposable / free / corporate, deterministic and key-free.
3. **Contact-Confidence Verdict** — don't blast 1,000 rows blindly; send the "green" ones → protect deliverability and sender reputation.
4. **Cleaning & normalization** — phone to E.164, socials stripped of tracking params, lowercased canonical domains → straight into your CRM.

### How to use
1. Collect business listings with a Google Maps scraper (or paste in your own list).
2. Connect the output to this actor as `records` (or pass a `datasetId` / `searchTerms`).
3. **Start** → grab the clean, prioritized contact list from the Dataset tab (use the **Contact Table** view).

### Pricing (Pay-Per-Event)
You only pay for what you use: per run + per 100 records processed + per enriched record produced. The core is LLM-free, so margins stay high and costs stay predictable. No monthly subscription.

# Actor input Schema

## `records` (type: `array`):

Raw business records to clean. Connect any Google Maps scraper's dataset output directly here. Common fields such as name/title, website/url, phone, emails and social are auto-detected.
## `datasetId` (type: `string`):

Instead of `records`: an Apify dataset ID holding the raw records to clean (e.g. the output dataset of a Google Maps scraper run).
## `searchTerms` (type: `array`):

If you have no dataset yet: we call an upstream Google Maps scraper with these terms (e.g. 'dentist in Berlin'). We leave scraping to the upstream actor; our job is to clean the output.
## `maxPlaces` (type: `integer`):

When searchTerms is provided, the maximum number of places to fetch per search term.
## `liveMxCheck` (type: `boolean`):

When enabled, the domain of each best email is checked for a live MX record (extra quality confirmation). Classification stays fully deterministic when disabled.

## Actor input object example

```json
{
  "records": [
    {
      "title": "Acme Dental Clinic",
      "url": "https://www.acmedental.com?utm=x",
      "phone": "+1 415 555 0142",
      "emails": [
        "info@acmedental.com"
      ],
      "social": [
        "https://facebook.com/acmedental?ref=page_internal"
      ]
    },
    {
      "name": "Acme Dental Clinic Downtown",
      "website": "acmedental.com",
      "phoneNumber": "+1 (415) 555-0142",
      "email": "jane.doe@acmedental.com"
    }
  ],
  "maxPlaces": 50,
  "liveMxCheck": 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 = {
    "records": [
        {
            "title": "Acme Dental Clinic",
            "url": "https://www.acmedental.com?utm=x",
            "phone": "+1 415 555 0142",
            "emails": [
                "info@acmedental.com"
            ],
            "social": [
                "https://facebook.com/acmedental?ref=page_internal"
            ]
        },
        {
            "name": "Acme Dental Clinic Downtown",
            "website": "acmedental.com",
            "phoneNumber": "+1 (415) 555-0142",
            "email": "jane.doe@acmedental.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("enezli/maps-contact-cleaner").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 = { "records": [
        {
            "title": "Acme Dental Clinic",
            "url": "https://www.acmedental.com?utm=x",
            "phone": "+1 415 555 0142",
            "emails": ["info@acmedental.com"],
            "social": ["https://facebook.com/acmedental?ref=page_internal"],
        },
        {
            "name": "Acme Dental Clinic Downtown",
            "website": "acmedental.com",
            "phoneNumber": "+1 (415) 555-0142",
            "email": "jane.doe@acmedental.com",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("enezli/maps-contact-cleaner").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 '{
  "records": [
    {
      "title": "Acme Dental Clinic",
      "url": "https://www.acmedental.com?utm=x",
      "phone": "+1 415 555 0142",
      "emails": [
        "info@acmedental.com"
      ],
      "social": [
        "https://facebook.com/acmedental?ref=page_internal"
      ]
    },
    {
      "name": "Acme Dental Clinic Downtown",
      "website": "acmedental.com",
      "phoneNumber": "+1 (415) 555-0142",
      "email": "jane.doe@acmedental.com"
    }
  ]
}' |
apify call enezli/maps-contact-cleaner --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Maps Contact & Email Enricher (CRM-Ready Leads)",
        "description": "Cleans any Maps scraper's raw output into CRM-ready contacts: cross-source dedup & merge, E.164 phone/social normalization, email quality class (corporate / role / free / disposable) and a \"who you can safely contact\" confidence verdict. No subscription — pay per record.",
        "version": "0.1",
        "x-build-id": "P2DidpsANJQW3fg5H"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/enezli~maps-contact-cleaner/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-enezli-maps-contact-cleaner",
                "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/enezli~maps-contact-cleaner/runs": {
            "post": {
                "operationId": "runs-sync-enezli-maps-contact-cleaner",
                "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/enezli~maps-contact-cleaner/run-sync": {
            "post": {
                "operationId": "run-sync-enezli-maps-contact-cleaner",
                "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",
                "properties": {
                    "records": {
                        "title": "Raw records (Google Maps scraper output)",
                        "type": "array",
                        "description": "Raw business records to clean. Connect any Google Maps scraper's dataset output directly here. Common fields such as name/title, website/url, phone, emails and social are auto-detected."
                    },
                    "datasetId": {
                        "title": "OR: connected dataset ID",
                        "type": "string",
                        "description": "Instead of `records`: an Apify dataset ID holding the raw records to clean (e.g. the output dataset of a Google Maps scraper run)."
                    },
                    "searchTerms": {
                        "title": "OR: search terms (optional scrape)",
                        "type": "array",
                        "description": "If you have no dataset yet: we call an upstream Google Maps scraper with these terms (e.g. 'dentist in Berlin'). We leave scraping to the upstream actor; our job is to clean the output.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPlaces": {
                        "title": "Max places per search (scrape mode)",
                        "type": "integer",
                        "description": "When searchTerms is provided, the maximum number of places to fetch per search term.",
                        "default": 50
                    },
                    "liveMxCheck": {
                        "title": "Live MX verification (optional)",
                        "type": "boolean",
                        "description": "When enabled, the domain of each best email is checked for a live MX record (extra quality confirmation). Classification stays fully deterministic when disabled.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
