# Local Business Lead Scraper for Cold Email, Clay & n8n (`prattsolutions/local-business-lead-scraper`) Actor

Build local business lead lists with emails from Google Maps. Combine business types and cities, get flat rows with email, phone, website and address, and send them to your cold email tool, Clay, n8n, Make or Zapier.

- **URL**: https://apify.com/prattsolutions/local-business-lead-scraper.md
- **Developed by:** [John Pratt](https://apify.com/prattsolutions) (community)
- **Categories:** Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 lead saveds

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

Local Business Lead Scraper builds **local business lead lists with emails** from Google Maps. Pick the business types you sell to and the cities to cover, such as `plumbers` and `electricians` in `Austin, TX` and `Round Rock, TX`. It searches every combination, visits each business's website for its emails, and returns **flat, CRM-ready rows** with email, phone, website, address, rating and review count. Send the leads to your cold email tool, to Clay, or into n8n, Make and Zapier workflows.

### What does Local Business Lead Scraper do?

- **Searches every business type in every location.** Five trades in 20 cities is 100 searches from two short lists.
- **Finds emails** on each business's website and puts the first one in an `email` column, with every email found in `emails`.
- **Saves only leads with an email by default**, so every row is ready for a cold email sequence, and you don't pay for businesses without one.
- **Removes duplicates.** A business found by several searches is saved once.
- **Gives flat rows**, one column per field, so the CSV imports straight into cold email tools, CRMs and spreadsheets.

### How to scrape local business leads

1. Open the Actor in Apify Console and go to the **Input** tab.
2. Enter your **Business types**, such as `plumbers`, and your **Locations**, such as `Austin, TX`. Each type is searched in each location as `plumbers in Austin, TX`.
3. Optionally add **Extra search queries** that don't fit that pattern, such as `wedding photographers near Lake Travis`.
4. Under **Lead filters**, keep **Only leads with an email** on, and optionally set a minimum rating or review count.
5. Click **Start**. When the run finishes, export the dataset as CSV, or connect it to your tools as shown below.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `businessTypes` | array of strings | none | Kinds of business to find, such as `plumbers`. Each is searched in every location. |
| `locations` | array of strings | none | Cities, neighborhoods or ZIP codes, such as `Austin, TX`. |
| `keywords` | array of strings | `[]` | Extra full Google Maps searches to run as well. |
| `onlyWithEmail` | boolean | `true` | Save only businesses where at least one email was found. |
| `minRating` | number, 0 to 5 | `0` | Skip businesses rated below this. |
| `minReviews` | integer | `0` | Skip businesses with fewer reviews than this. |
| `depth` | integer, 1 or more | `10` | How many times to scroll each search's results list. A higher value returns more leads for broad searches but takes longer. The Console form starts at 1 for a quick first run. |
| `maxPlacesPerSearch` | integer | none | Check at most this many places per search, the first ones Google lists. Empty checks every place. The Console form starts at 8 for a quick first run. |
| `language` | string | `en` | Google interface language code, such as `en`, `es`, `de` or `fr`. |

Give business types and locations, extra search queries, or both.

```json
{
    "businessTypes": ["plumbers", "electricians"],
    "locations": ["Austin, TX", "Round Rock, TX"],
    "onlyWithEmail": true,
    "minReviews": 5
}
```

### Output

Each lead is one item in the dataset. This example is fictional:

```json
{
    "name": "Example Plumbing LLC",
    "category": "Plumber",
    "phone": "+1 512-555-0123",
    "email": "hello@example.com",
    "emails": ["hello@example.com", "service@example.com"],
    "website": "https://www.example.com/",
    "address": "400 Main St, Austin, TX 78701, United States",
    "street": "400 Main St",
    "city": "Austin",
    "state": "Texas",
    "postal_code": "78701",
    "country": "US",
    "rating": 4.9,
    "review_count": 311,
    "google_maps_url": "https://www.google.com/maps/place/...",
    "place_id": "ChIJ...",
    "latitude": 30.2701,
    "longitude": -97.7405,
    "query": "plumbers in Austin, TX"
}
```

`email` is the first email found on the website, and `emails` lists every one. `rating`, `review_count`, `latitude` and `longitude` are numbers, or `null` when Google has no value.

### Use the leads in cold email, Clay and n8n

- **Cold email tools:** export the dataset as CSV from the **Output** tab, or from the API with `format=csv`, and import it. Map `email` to the email column, and `name`, `city` and `category` to personalization fields.
- **Clay:** import the CSV into a table, or add an HTTP API column that calls the `run-sync-get-dataset-items` endpoint below for a business type and city.
- **n8n:** use the Apify node to run the Actor and get its dataset items, or an HTTP Request node that calls `run-sync-get-dataset-items`. See [Apify's n8n integration](https://docs.apify.com/platform/integrations/n8n).
- **Make and Zapier:** use the Apify app to run the Actor and pass each lead to the next step. See the [Make](https://docs.apify.com/platform/integrations/make) and [Zapier](https://docs.apify.com/platform/integrations/zapier) guides.
- **Any other tool:** add a [webhook](https://docs.apify.com/platform/integrations/webhooks) that fires when a run finishes, then read the dataset from the API.

### How much does it cost?

It costs **$2.50 per 1,000 leads** ($0.0025 per lead saved). With **Only leads with an email** on, businesses without an email aren't saved, so you pay only for leads you can email. Each run also has Apify's standard start fee of $0.00005, and there's no separate charge for compute.

- 2 business types in 2 cities make 4 searches. If they find 300 businesses and 140 have an email, the run costs **$0.35**.
- 1,000 leads with emails cost **$2.50**.

To cap what a run can cost, set **Maximum cost per run** in the run options (`maxTotalChargeUsd` in the API). When a run reaches the cap, it stops saving leads.

### Local business leads API

Get your API token in **Apify Console → Settings → API & Integrations**. This request starts a run, waits for it and returns the leads as CSV. Apify ends it with HTTP `408` after 300 seconds, so keep it to one or two searches, and start bigger runs with the `runs` endpoint or a client library:

```bash
curl -X POST "https://api.apify.com/v2/acts/prattsolutions~local-business-lead-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN&format=csv" \
  -H "Content-Type: application/json" \
  -d '{"businessTypes": ["plumbers"], "locations": ["Austin, TX"]}'
```

Python, with the [`apify-client`](https://docs.apify.com/api/client/python) package:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("prattsolutions/local-business-lead-scraper").call(run_input={
    "businessTypes": ["plumbers", "electricians"],
    "locations": ["Austin, TX", "Round Rock, TX"],
})
for lead in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(lead["name"], lead["email"], lead["phone"])
```

### FAQ

#### How are the emails found?

For each business with a website, the scraper loads the page Google links to, usually the home page, and collects the addresses in its `mailto:` links, or else the email addresses written on the page. Websites on Facebook, Instagram or Twitter are skipped. An email shown only on a separate contact page isn't found.

#### How many leads will have an email?

It depends on the industry. Trades, professional services, clinics and B2B companies publish an email on their website much more often than restaurants and shops. Run one search first to see the rate for your niche.

#### How long does a run take?

Searches run one after another, and visiting each website adds a few seconds per business, so a broad search takes several minutes. Each search is capped at 10 minutes: businesses not reached by then are left out, and the run still succeeds. Use smaller locations to stay under the cap, or set **Maximum places per search** to check only the first businesses of each list.

#### Why was my first run in a while slow to start?

When nobody has used the scraper for a few weeks, its backend needs a few minutes to wake up. The log shows `Lambda is waking up (...); retrying in 15s.`, and the run then continues normally.

#### Is it legal to scrape business emails for cold email?

The Actor collects only what businesses publish on Google Maps and their own websites. Business emails can still be personal data, and cold email is regulated: the GDPR and similar laws cover how you store and use the data, and CAN-SPAM and similar laws cover what you send. Collect the data for a legitimate purpose, and check with a lawyer if you're unsure.

# Actor input Schema

## `businessTypes` (type: `array`):

Kinds of business to find, one per line, such as "plumbers" or "dental clinics". Each one is searched in every location below as "<type> in <location>".

## `locations` (type: `array`):

Cities, neighborhoods or ZIP codes to search, one per line, such as "Austin, TX". Smaller areas return more businesses in total, because Google Maps lists around 120 per search.

## `keywords` (type: `array`):

Optional full Google Maps searches to run as well, one per line, such as "wedding photographers near Lake Travis". Use them for searches that don't fit the business type plus location pattern.

## `onlyWithEmail` (type: `boolean`):

Save only businesses where at least one email was found on their website. You're charged per saved lead, so businesses without an email cost nothing.

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

Skip businesses rated below this, from 1 to 5. 0 keeps every business, including those with no rating yet.

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

Skip businesses with fewer Google reviews than this. 0 keeps every business.

## `depth` (type: `integer`):

How many times to scroll each search's results list. Each scroll loads more businesses, so a higher value returns more leads for broad searches but makes each search take longer. The form starts at 1 so a first run finishes quickly. Runs that leave it out use 10.

## `maxPlacesPerSearch` (type: `integer`):

Check at most this many places of each search's results list, the first ones Google lists. Visiting each website takes a few seconds, so a cap keeps runs short and costs predictable. The form starts at 8 for a quick first run. Leave it empty to check every place.

## `language` (type: `string`):

Google interface language code, such as en, es, de or fr. It sets the language of the categories Google returns.

## Actor input object example

```json
{
  "businessTypes": [
    "plumbers",
    "electricians"
  ],
  "locations": [
    "Austin, TX",
    "Round Rock, TX"
  ],
  "keywords": [
    "wedding photographers near Lake Travis"
  ],
  "onlyWithEmail": true,
  "minRating": 0,
  "minReviews": 0,
  "depth": 1,
  "maxPlacesPerSearch": 8,
  "language": "en"
}
```

# Actor output Schema

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

All places in the run's default dataset. Each field is described in the dataset schema.

# 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 = {
    "businessTypes": [
        "plumbers"
    ],
    "locations": [
        "Round Rock, TX"
    ],
    "depth": 1,
    "maxPlacesPerSearch": 8
};

// Run the Actor and wait for it to finish
const run = await client.actor("prattsolutions/local-business-lead-scraper").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 = {
    "businessTypes": ["plumbers"],
    "locations": ["Round Rock, TX"],
    "depth": 1,
    "maxPlacesPerSearch": 8,
}

# Run the Actor and wait for it to finish
run = client.actor("prattsolutions/local-business-lead-scraper").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 '{
  "businessTypes": [
    "plumbers"
  ],
  "locations": [
    "Round Rock, TX"
  ],
  "depth": 1,
  "maxPlacesPerSearch": 8
}' |
apify call prattsolutions/local-business-lead-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,prattsolutions/local-business-lead-scraper"
        }
    }
}
```

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/o0fChIHJCT8yEkSWM/builds/QgYg5QkPamxqV9F0t/openapi.json
