# Google Maps Leads Cleaner: dedupe, phones, CRM-ready (`ucchiii/maps-leads-cleaner`) Actor

Turn Google Maps scraper results into a clean lead list: remove duplicate places, format phone numbers (E.164), extract website domains, flatten opening hours, filter by rating, reviews, category, website or phone. $0.50 per 1,000 leads.

- **URL**: https://apify.com/ucchiii/maps-leads-cleaner.md
- **Developed by:** [Actor Factory](https://apify.com/ucchiii) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 leads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Leads Cleaner — dedupe, format phones, CRM-ready

**For sales teams, agencies and lead-gen freelancers who scrape Google Maps.** You now have **duplicates across runs,
phone numbers in five formats, closed businesses and nested fields** that your CRM won't import. This Actor turns the
output of any Google Maps scraper into a **clean, flat lead list** in one run — no scraping, no proxies.
**$0.50 per 1,000 leads written.**

- **Merge & dedupe** several runs (by place ID, then name + address, then name + phone)
- **Phones in E.164** (`+14155550132`), validated — invalid numbers are flagged, not guessed
- **Website domain** extracted (`example.com`) for enrichment and email-finder tools
- **Opening hours flattened** to one readable column
- **Filters**: drop closed places, keep only leads with a website / valid phone, minimum rating and reviews,
  include or exclude categories
- Flat columns that import straight into HubSpot, Salesforce, Pipedrive, Google Sheets or CSV
- Reading, duplicates and filtered-out rows are free.

Works with the output of popular Google Maps scrapers (e.g. `compass/crawler-google-places`) and other tools that
use similar field names (`title`/`name`, `phone`, `website`, `address`, `placeId`, `totalScore`, `reviewsCount`).

### Use cases

- Prepare a cold-outreach list: only open places with a website and a valid phone
- Merge several city or category scrapes into one deduplicated list
- Export a CRM import file (HubSpot, Salesforce, Pipedrive) or Google Sheets from raw scraper output

### Input

```json
{
  "datasetIds": ["<dataset ID of your Google Maps scraper run>"],
  "requireWebsite": true,
  "minRating": 4.0,
  "categoriesInclude": ["dentist"]
}
```

Leave `datasetIds` empty to see a free demo on sample data.

### Output (one row per lead)

```json
{
  "name": "Sample Dental Clinic", "category": "Dentist", "categories": ["Dentist"],
  "phone": "+442079460018", "phoneRaw": "020 7946 0018", "website": "example.org", "domain": "example.org",
  "address": null, "street": null, "city": "London", "postalCode": null, "state": null, "countryCode": "GB",
  "lat": null, "lng": null, "rating": 4.9, "reviewsCount": 57, "openingHours": "Monday: 9 AM–5 PM; …",
  "isClosed": false, "placeId": "…", "mapsUrl": "https://www.google.com/maps/…"
}
```

Run statistics (`itemsRead`, `duplicates`, `filteredOut`, `written`, `skippedInvalid`) are saved in the key-value store as `STATS`.

### Notes

This Actor only processes datasets you already own; it does not access Google Maps. You are responsible for how the
underlying data was collected and used.

### More tools from the same developer

- [Google Maps Reviews Analyzer](https://apify.com/ucchiii/reviews-insights) — per-place ratings, trends, owner response rate and top terms from Google Maps reviews
- [Google Maps Market Analyzer](https://apify.com/ucchiii/maps-market-analyzer) — market and competitor tables from Google Maps scraper datasets
- [Google Sheets Export](https://apify.com/ucchiii/google-sheets-export) — export an Apify dataset to Google Sheets
- [Dataset Merge & Dedup](https://apify.com/ucchiii/dataset-dedup-merge) — merge Apify datasets and remove duplicates by the fields you choose

# Actor input Schema

## `datasetIds` (type: `array`):

Dataset IDs (the 'defaultDatasetId' of a finished run of the source Actor, e.g. 'WkzbQMuFYuamGv3YF'). Datasets from your Google Maps scraper runs (e.g. compass/crawler-google-places). Several runs are merged and deduplicated. Leave empty to run a free demo on sample data (not charged).

## `excludeClosed` (type: `boolean`):

Drop places marked permanently or temporarily closed.

## `requireWebsite` (type: `boolean`):

Keep only leads that have a website.

## `requirePhone` (type: `boolean`):

Keep only leads whose phone number could be validated.

## `minRating` (type: `number`):

Keep places with at least this star rating. Allowed range 0 to 5 (maximum 5). Empty = no rating filter.

## `minReviews` (type: `integer`):

Keep places with at least this many reviews. Minimum 0. Empty = no filter.

## `categoriesInclude` (type: `array`):

Keep places whose category contains any of these words (e.g. \['dentist', 'restaurant']). Empty = all.

## `categoriesExclude` (type: `array`):

Remove places whose category contains any of these words.

## `defaultCountry` (type: `string`):

Two-letter country code used to read local phone numbers when the place has no country (e.g. 'US', 'GB').

## Actor input object example

```json
{
  "excludeClosed": true,
  "requireWebsite": false,
  "requirePhone": false
}
```

# Actor output Schema

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

One item per unique place: name, category, phone (E.164), website, domain, city, countryCode, rating, reviewsCount, mapsUrl.

## `stats` (type: `string`):

Record STATS: run counts (items read, kept, removed).

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ucchiii/maps-leads-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ucchiii/maps-leads-cleaner").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 '{}' |
apify call ucchiii/maps-leads-cleaner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ucchiii/maps-leads-cleaner"
        }
    }
}
```

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/Yuh7AAv6kAykPYjaZ/builds/LIieX5uznLDEw69Yp/openapi.json
