# Local Business Lead Pipeline: Maps + Domain + Email Intel (`scrapemint/local-lead-pipeline`) Actor

City and category in, ranked lead list out. Chains Google Maps, website enrichment, and DNS MX check to return one row per qualified lead with name, address, phone, rating, sentiment, verified website, and likely contact emails. For agencies and SMB outbound teams. Pay per qualified lead.

- **URL**: https://apify.com/scrapemint/local-lead-pipeline.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 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

## Local Business Lead Pipeline

Turn a city plus business category into a ranked lead list. The pipeline chains a Google Maps search with website verification and DNS-level enrichment, then scores each business as **basic** or **enriched** so your outbound team only pays for what is usable.

### What you get per row

| Field | Description |
|---|---|
| `name`, `category`, `address`, `phone` | Core business identity from Google Maps |
| `rating`, `reviewCount` | Aggregate review signals |
| `recentNegativeReviewCount` | Out of the last 5 reviews, how many are 3 stars or below (when sentiment scraping is on) |
| `website` | Place website from Maps |
| `websiteReachable` | True when an HTTP HEAD to the site returns < 500 |
| `domain` | Root domain of the website |
| `mxFound` | True when the domain has a valid MX record (real mailbox infrastructure) |
| `likelyContactEmails` | Inferred `info@`, `contact@`, `hello@`, and any emails the Maps stage already extracted |
| `latitude`, `longitude`, `placeId`, `mapsUrl` | Geo and Maps identifiers for re-runs and CRM joins |
| `qualityTier` | `enriched` or `basic` based on your input rules |

### How qualification works

A row is **enriched** when ALL of the following hold:
- Rating is at or above `minRating` (default `4.0`)
- Review count is at or above `minReviews` (default `10`)
- Has a phone
- If `requireWebsite` is on (default): website is reachable AND domain has an MX record

Everything else that came back from Maps is returned as **basic**.

### Pricing

- `enriched_lead` $0.08 each. First 5 per run are free.
- `basic_lead` $0.03 each.

Apify auto-applies 20% margin. You see net.

#### What you actually pay per lead

This actor chains the Google Maps Intelligence actor under the hood. Your run will show two line items on the Apify billing breakdown: one for the Maps stage and one for this pipeline.

| Quality tier | Maps stage | This pipeline | Total per lead |
|---|---|---|---|
| Basic | $0.02 | $0.03 | **$0.05** |
| Enriched | $0.02 | $0.08 | **$0.10** |

For comparison, intent-scored B2B leads run $1 to $5 per record on Apollo, Clay, and ZoomInfo. You are paying 10x to 50x less for a lead that already includes a verified MX and a phone.

### Two ways to scope a run

**Easy mode:** pass `cities` and `categories`. The pipeline cross-joins them into one Maps query per pair.

```json
{
  "cities": ["Austin TX", "Denver CO"],
  "categories": ["dentists", "medspas"]
}
````

The above runs 4 queries: `dentists in Austin TX`, `medspas in Austin TX`, `dentists in Denver CO`, `medspas in Denver CO`.

**Power mode:** pass raw `searchQueries`. Useful when you already have hand-tuned queries.

```json
{
  "searchQueries": ["plumber 78704", "hvac near Miami Beach"]
}
```

You can use both modes in the same run.

### Common use cases

- Agencies building local lead lists for client outreach
- B2B SaaS sellers prospecting SMBs by vertical
- Real estate scouts identifying business owners in a footprint
- Door-to-door route planning by category and rating

### Tips

- Start with `maxPlacesTotal: 50` to validate output and quality before scaling.
- Turn `requireWebsite` off when prospecting trades that often skip a web presence (mobile repair, in-home services). They will land as basic leads and cost less.
- `minReviews: 10` filters out fake or newly opened listings. Lower it only when you want fresh openings.

### Built on

- Google Maps Intelligence (sister actor) for search and place data
- DNS-level MX verification (no third-party API)
- Email pattern inference from canonical domain

PAY\_PER\_EVENT on the Apify BRONZE plan.

# Actor input Schema

## `cities` (type: `array`):

Cities or locations to search. Examples: \["Austin TX", "Brooklyn NY", "Manchester UK"]. Combined with categories to form one query per pair.

## `categories` (type: `array`):

Business categories. Examples: \["dentists", "hvac contractors", "law firms", "medspas"].

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

Optional. Pre-built Google Maps queries. Examples: "dentist 78704", "plumbers near Miami".

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

Cap on Google Maps results pulled per query. Higher values find more leads but cost more time.

## `maxPlacesTotal` (type: `integer`):

Hard cap on places processed per run. Controls total cost.

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

Places below this rating are still returned as basic leads, but cannot qualify as enriched. Default 4.0 filters out neglected listings.

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

Places below this review count are still returned as basic leads, but cannot qualify as enriched. Default 10 filters out fake or new listings.

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

Enriched leads must have a website that resolves and has a valid MX record. Recommended on for outbound use cases.

## `scrapeReviewsForSentiment` (type: `boolean`):

Asks the Maps scraper for up to 5 recent reviews per place to surface negative review count. Adds time per place.

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

Apify proxy passed through to the Google Maps stage. Residential strongly recommended.

## Actor input object example

```json
{
  "cities": [
    "Austin TX",
    "Denver CO"
  ],
  "categories": [
    "dentists",
    "medspas"
  ],
  "searchQueries": [],
  "maxPlacesPerQuery": 25,
  "maxPlacesTotal": 25,
  "minRating": 4,
  "minReviews": 10,
  "requireWebsite": true,
  "scrapeReviewsForSentiment": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "cities": [
        "Austin TX",
        "Denver CO"
    ],
    "categories": [
        "dentists",
        "medspas"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/local-lead-pipeline").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 = {
    "cities": [
        "Austin TX",
        "Denver CO",
    ],
    "categories": [
        "dentists",
        "medspas",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/local-lead-pipeline").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 '{
  "cities": [
    "Austin TX",
    "Denver CO"
  ],
  "categories": [
    "dentists",
    "medspas"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scrapemint/local-lead-pipeline --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapemint/local-lead-pipeline",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Local Business Lead Pipeline: Maps + Domain + Email Intel",
        "description": "City and category in, ranked lead list out. Chains Google Maps, website enrichment, and DNS MX check to return one row per qualified lead with name, address, phone, rating, sentiment, verified website, and likely contact emails. For agencies and SMB outbound teams. Pay per qualified lead.",
        "version": "0.1",
        "x-build-id": "jYKKXFAkqoSK4LetQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapemint~local-lead-pipeline/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapemint-local-lead-pipeline",
                "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/scrapemint~local-lead-pipeline/runs": {
            "post": {
                "operationId": "runs-sync-scrapemint-local-lead-pipeline",
                "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/scrapemint~local-lead-pipeline/run-sync": {
            "post": {
                "operationId": "run-sync-scrapemint-local-lead-pipeline",
                "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": {
                    "cities": {
                        "title": "Cities",
                        "type": "array",
                        "description": "Cities or locations to search. Examples: [\"Austin TX\", \"Brooklyn NY\", \"Manchester UK\"]. Combined with categories to form one query per pair.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "categories": {
                        "title": "Business categories",
                        "type": "array",
                        "description": "Business categories. Examples: [\"dentists\", \"hvac contractors\", \"law firms\", \"medspas\"].",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQueries": {
                        "title": "Raw search queries",
                        "type": "array",
                        "description": "Optional. Pre-built Google Maps queries. Examples: \"dentist 78704\", \"plumbers near Miami\".",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxPlacesPerQuery": {
                        "title": "Max places per query",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Cap on Google Maps results pulled per query. Higher values find more leads but cost more time.",
                        "default": 25
                    },
                    "maxPlacesTotal": {
                        "title": "Max places per run",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Hard cap on places processed per run. Controls total cost.",
                        "default": 25
                    },
                    "minRating": {
                        "title": "Minimum rating (enriched tier)",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Places below this rating are still returned as basic leads, but cannot qualify as enriched. Default 4.0 filters out neglected listings.",
                        "default": 4
                    },
                    "minReviews": {
                        "title": "Minimum review count (enriched tier)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Places below this review count are still returned as basic leads, but cannot qualify as enriched. Default 10 filters out fake or new listings.",
                        "default": 10
                    },
                    "requireWebsite": {
                        "title": "Require a working website for enriched tier",
                        "type": "boolean",
                        "description": "Enriched leads must have a website that resolves and has a valid MX record. Recommended on for outbound use cases.",
                        "default": true
                    },
                    "scrapeReviewsForSentiment": {
                        "title": "Pull recent reviews for sentiment",
                        "type": "boolean",
                        "description": "Asks the Maps scraper for up to 5 recent reviews per place to surface negative review count. Adds time per place.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy passed through to the Google Maps stage. Residential strongly recommended.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
