# Local Business Lead Enrichment Engine (`constant_quadruped/lead-enrichment-engine`) Actor

Find and enrich local business leads from Google Places, Yelp, and BBB. Extracts emails, social media, ratings, and contact info in one run.

- **URL**: https://apify.com/constant\_quadruped/lead-enrichment-engine.md
- **Developed by:** [CQ](https://apify.com/constant_quadruped) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 1 total users, 0 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 Enrichment Engine

Find local businesses via Google Places and enrich each lead with ratings, emails, social media, and Better Business Bureau data in a single run.

### What it does

This actor turns a simple query like `"dentists in Austin TX"` into a fully enriched sales-ready lead list. Each business comes back with:

- **Core info** (from Google Places): name, address, phone, website, hours, categories, GPS coordinates
- **Ratings**: Google rating + review count, Yelp rating + review count, BBB letter grade + accreditation status
- **Contact extraction**: email addresses scraped from the business website (homepage + contact/about pages)
- **Social media**: Facebook, Instagram, Twitter/X, LinkedIn, YouTube profile URLs found on the website

### When to use it

- **Sales teams** building prospect lists for outbound
- **Marketing agencies** researching clients in a new territory
- **Lead generation services** building B2B databases
- **Local SEO consultants** identifying businesses needing online presence help
- **Real estate, insurance, and financial professionals** finding local leads

### Required setup

#### Google Places API key (required)

The actor uses Google Places Text Search and Place Details APIs. You must provide your own key:

1. Go to [Google Cloud Console](https://console.cloud.google.com)
2. Create a project (or use existing)
3. Enable the **Places API**
4. Create an API key (APIs & Services → Credentials → Create → API Key)
5. (Recommended) Restrict the key to Places API only

**Cost:** Google charges ~$0.017 per Text Search and ~$0.017 per Place Details request (as of 2026). A 50-lead search costs ~$1.70 in Google fees on top of Apify usage. Google provides $200/month free credit.

#### Yelp Fusion API key (optional, free)

For Yelp rating enrichment:

1. Go to [Yelp Developers](https://www.yelp.com/developers/v3/manage_app)
2. Create an app, copy the API key
3. Free tier: 5,000 API calls/day

If you don't provide a Yelp key, Yelp enrichment is silently skipped.

### Input parameters

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `query` | string | yes | `dentists` | Business type (e.g., `"plumbers"`, `"coffee shops"`) |
| `location` | string | yes | `Austin, TX` | City, state, or address to search |
| `googleApiKey` | secret | yes | — | Google Places API key |
| `maxResults` | integer | no | `50` | Max businesses to return (1-200) |
| `enrichEmail` | boolean | no | `true` | Crawl websites to extract emails + socials |
| `enrichYelp` | boolean | no | `true` | Cross-reference with Yelp Fusion API |
| `yelpApiKey` | secret | conditional | — | Required if `enrichYelp=true` |
| `enrichBBB` | boolean | no | `false` | Cross-reference with BBB (HTML scrape, slower) |
| `proxyConfiguration` | object | no | Apify proxy | Used for BBB and website crawling |

### Output format

Each lead:

```json
{
  "name": "Smith Family Dentistry",
  "address": "123 Main St, Austin, TX 78701, USA",
  "city": "Austin",
  "state": "TX",
  "zip": "78701",
  "phone": "(512) 555-1234",
  "website": "https://smithfamilydental.com",
  "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
  "googleRating": 4.7,
  "googleReviewCount": 234,
  "googleCategories": ["dentist", "health"],
  "hours": {
    "monday": "8:00 AM – 5:00 PM",
    "tuesday": "8:00 AM – 5:00 PM"
  },
  "yelpRating": 4.5,
  "yelpReviewCount": 89,
  "yelpUrl": "https://www.yelp.com/biz/smith-family-dentistry",
  "bbbRating": "A+",
  "bbbAccredited": true,
  "emails": ["info@smithfamilydental.com", "appointments@smithfamilydental.com"],
  "socialMedia": {
    "facebook": "https://facebook.com/smithdentistry",
    "instagram": "https://instagram.com/smithdentistry"
  },
  "enrichedAt": "2026-04-14T12:30:00.000Z"
}
````

Fields that couldn't be enriched are `null` (ratings) or empty (arrays/objects).

### How enrichment works

1. **Google Places Text Search** — finds up to `maxResults` businesses matching `query` + `location`
2. **Google Places Details** — fetches phone, website, hours, categories for each place
3. **Yelp match** (if enabled) — phone match first, then name+location fallback
4. **BBB scrape** (if enabled) — searches bbb.org for the business, extracts letter grade + accreditation
5. **Website crawl** (if enabled) — visits homepage + `/contact`, `/contact-us`, `/about`, `/about-us`
   - Extracts emails from `mailto:` links, plain text, and HTML attributes
   - Extracts social media URLs (Facebook, Instagram, Twitter/X, LinkedIn, YouTube)
   - Filters out junk emails (example.com, sentry.io, etc.)

### Pricing model

Pay-per-result. Each enriched lead pushed to the dataset = 1 billable result.

### Example inputs

#### Basic: dentists in Austin

```json
{
  "query": "dentists",
  "location": "Austin, TX",
  "maxResults": 50,
  "googleApiKey": "YOUR_GOOGLE_KEY",
  "enrichEmail": true,
  "enrichYelp": false
}
```

#### Full enrichment with Yelp + BBB

```json
{
  "query": "plumbers",
  "location": "Dallas, TX",
  "maxResults": 30,
  "googleApiKey": "YOUR_GOOGLE_KEY",
  "yelpApiKey": "YOUR_YELP_KEY",
  "enrichEmail": true,
  "enrichYelp": true,
  "enrichBBB": true
}
```

#### Fast mode (Google only)

```json
{
  "query": "coffee shops",
  "location": "Seattle, WA",
  "maxResults": 100,
  "googleApiKey": "YOUR_GOOGLE_KEY",
  "enrichEmail": false,
  "enrichYelp": false,
  "enrichBBB": false
}
```

### Notes and caveats

- **Google Places returns max 60 results per search** (20 per page, 3 pages). If you set `maxResults > 60`, you'll get 60.
- **Email extraction only works when the business has a website** in their Google listing. ~30-50% of local businesses have websites.
- **Some websites block scraping** — those leads will have empty `emails` and `socialMedia` fields.
- **BBB scraping is US-only** and slower than other enrichment (~3s per business).
- **Yelp phone match** is very reliable when the business has a registered phone; name+location match is best-effort.
- **Obfuscated emails** (JavaScript-rendered, image-based) are not extracted in this version.

### Version history

- **v1.2** — Added output schema + dataset views for clickable results
- **v1.1** — Logo + metadata
- **v1.0** — Initial release with Google Places, Yelp, BBB, email/social enrichment

# Actor input Schema

## `query` (type: `string`):

Type of business to search for (e.g., 'dentists', 'plumbers', 'restaurants')

## `location` (type: `string`):

City, state, or address to search around (e.g., 'Austin, TX')

## `maxResults` (type: `integer`):

Maximum number of businesses to return (1-200)

## `googleApiKey` (type: `string`):

Your Google Cloud API key with Places API enabled. Get one at console.cloud.google.com

## `enrichEmail` (type: `boolean`):

Crawl each business website to extract email addresses

## `enrichYelp` (type: `boolean`):

Cross-reference with Yelp for additional ratings and reviews (uses free Yelp Fusion API)

## `yelpApiKey` (type: `string`):

Your Yelp Fusion API key. Get one free at fusion.yelp.com. Required if Enrich with Yelp is enabled.

## `enrichBBB` (type: `boolean`):

Cross-reference with Better Business Bureau for accreditation and rating

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

Proxy settings for web scraping (BBB and email extraction)

## Actor input object example

```json
{
  "query": "dentists",
  "location": "Austin, TX",
  "maxResults": 50,
  "enrichEmail": true,
  "enrichYelp": true,
  "enrichBBB": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `leads` (type: `string`):

Business leads enriched with contact info, ratings, emails, and social media from multiple sources

# 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 = {
    "query": "dentists",
    "location": "Austin, TX",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("constant_quadruped/lead-enrichment-engine").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 = {
    "query": "dentists",
    "location": "Austin, TX",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("constant_quadruped/lead-enrichment-engine").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 '{
  "query": "dentists",
  "location": "Austin, TX",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call constant_quadruped/lead-enrichment-engine --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Local Business Lead Enrichment Engine",
        "description": "Find and enrich local business leads from Google Places, Yelp, and BBB. Extracts emails, social media, ratings, and contact info in one run.",
        "version": "1.6",
        "x-build-id": "MPEk60226OXjpZypv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/constant_quadruped~lead-enrichment-engine/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-constant_quadruped-lead-enrichment-engine",
                "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/constant_quadruped~lead-enrichment-engine/runs": {
            "post": {
                "operationId": "runs-sync-constant_quadruped-lead-enrichment-engine",
                "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/constant_quadruped~lead-enrichment-engine/run-sync": {
            "post": {
                "operationId": "run-sync-constant_quadruped-lead-enrichment-engine",
                "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",
                "required": [
                    "query",
                    "location",
                    "googleApiKey"
                ],
                "properties": {
                    "query": {
                        "title": "Business Type",
                        "type": "string",
                        "description": "Type of business to search for (e.g., 'dentists', 'plumbers', 'restaurants')"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City, state, or address to search around (e.g., 'Austin, TX')"
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of businesses to return (1-200)",
                        "default": 50
                    },
                    "googleApiKey": {
                        "title": "Google Places API Key",
                        "type": "string",
                        "description": "Your Google Cloud API key with Places API enabled. Get one at console.cloud.google.com"
                    },
                    "enrichEmail": {
                        "title": "Extract Emails",
                        "type": "boolean",
                        "description": "Crawl each business website to extract email addresses",
                        "default": true
                    },
                    "enrichYelp": {
                        "title": "Enrich with Yelp",
                        "type": "boolean",
                        "description": "Cross-reference with Yelp for additional ratings and reviews (uses free Yelp Fusion API)",
                        "default": true
                    },
                    "yelpApiKey": {
                        "title": "Yelp Fusion API Key",
                        "type": "string",
                        "description": "Your Yelp Fusion API key. Get one free at fusion.yelp.com. Required if Enrich with Yelp is enabled."
                    },
                    "enrichBBB": {
                        "title": "Enrich with BBB",
                        "type": "boolean",
                        "description": "Cross-reference with Better Business Bureau for accreditation and rating",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for web scraping (BBB and email extraction)"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
