# B2B Local Business Leads & Email Contact Enricher (`thomas_shelby_0010/b2b-local-business-enricher`) Actor

Scrape local B2B business leads with enriched contact data, verified public emails, phone numbers, addresses, and social media profiles (LinkedIn, Facebook, Instagram, Twitter/X, YouTube).

- **URL**: https://apify.com/thomas_shelby_0010/b2b-local-business-enricher.md
- **Developed by:** [Thomas Shelby](https://apify.com/thomas_shelby_0010) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-usage

## 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

## B2B Local Business Leads & Email Contact Enricher 🎯📧

Scale your outbound sales pipeline with fresh, verified B2B local business leads. This Actor extracts local business directories by industry and location, then automatically crawls each business's website using **pure HTTP** to extract **public contact emails**, **phone numbers**, **addresses**, and **social media profiles** (LinkedIn, Facebook, Instagram, Twitter/X, YouTube).

No slow, heavy headless browsers. No stale databases. Pure speed, low compute cost, and high delivery rates.

***

### ⚡ Why Use This Lead Enricher?

| Feature | Stale Databases (Apollo, ZoomInfo) | Slow Browser Scrapers | **B2B Local Business Enricher** |
| :--- | :--- | :--- | :--- |
| **Data Freshness** | Months/years old | Real-time | **Real-time from live company websites** |
| **Cost per 1k Leads** | $200 – $500 | $15 – $30 | **$2.00 / 1,000 enriched leads** |
| **Execution Speed** | API snapshot | Heavy / Slow (Chromium) | **Fast pure HTTP concurrent requests** |
| **Email Quality** | Often obsolete / bounces | Partial | **Cleaned & filtered (no dummy/asset false positives)** |
| **Social Profiles** | Incomplete | Incomplete | **LinkedIn, Facebook, Instagram, X, YouTube** |

***

### 🌟 Key Features

- **Hyper-Targeted Local Discovery**: Search any business category, trade, or service across any city, state, or country (e.g., `digital marketing agency` in `Austin, TX`, `plumbers` in `Miami, FL`, `accounting firms` in `London, UK`).
- **Deep Website Contact Enrichment**: Visits company homepages and automatically explores `/contact` and `/about` subpages to discover public contact emails.
- **Smart Primary Email Selection**: Ranks candidate emails prioritizing functional business mailboxes (`info@`, `contact@`, `hello@`, `sales@`, `office@`).
- **Advanced False-Positive Filtering**: Automatically excludes image assets (`logo@2x.png`), Sentry telemetry (`@sentry.io`), Wix infrastructure emails, and dummy placeholders.
- **Full Social Footprint**: Captures normalized profile links for LinkedIn (company & personal), Facebook, Instagram, Twitter/X, and YouTube.
- **Ultra-Lightweight & Concurrent**: Pure HTTP architecture with configurable concurrency (`asyncio.gather` + `Semaphore`). Runs in as little as 256 MB of RAM.
- **Fault-Tolerant Partial Lead Retention**: If a specific business website times out or fails SSL handshake, the base business lead (name, phone, address, website) is retained rather than dropped.
- **Built-in Dry-Run Mode**: Test your integration workflows and downstream automations with realistic mock leads without incurring external network latency.

***

### 💰 Pricing: Pay-Per-Event (PPE)

Pay only for results:

- **$2.00 per 1,000 fully enriched B2B leads** ($0.002 per lead)
- Minimum compute usage (256 MB memory allocation) means near-zero platform compute charges.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `query` | `String` | `"digital marketing agency"` | Business category, trade, or industry keyword (e.g. `plumbers`, `commercial cleaning`, `roofing contractors`). |
| `location` | `String` | `"Austin, TX"` | Target geographic city and state or country (e.g. `Miami, FL`, `Denver, CO`, `Chicago, IL`). |
| `maxItems` | `Integer` | `50` | Maximum number of business leads to collect and enrich (1 – 1,000). |
| `enrichEmails` | `Boolean` | `true` | Visit company websites to extract public contact emails. |
| `enrichSocials` | `Boolean` | `true` | Extract social media profile URLs (LinkedIn, Facebook, Instagram, Twitter/X, YouTube). |
| `dryRun` | `Boolean` | `false` | Execute in mock mode for instant pipeline testing without making outbound requests. |
| `proxyConfiguration` | `Object` | `None` | Optional Apify proxy configuration or custom proxy settings. |

#### Example Input (`INPUT.json`)

```json
{
  "query": "commercial cleaning services",
  "location": "Dallas, TX",
  "maxItems": 50,
  "enrichEmails": true,
  "enrichSocials": true,
  "dryRun": false
}
```

***

### 📤 Sample Output

Each item pushed to the default Apify Dataset is structured as follows:

```json
[
  {
    "name": "Apex Commercial Cleaners",
    "category": "Commercial Cleaning Services",
    "address": "450 Main St, Suite 200",
    "city": "Dallas",
    "state": "TX",
    "country": "United States",
    "phone": "(214) 555-0182",
    "website": "https://www.apexcleanersdallas.com",
    "emails": [
      "contact@apexcleanersdallas.com",
      "sales@apexcleanersdallas.com"
    ],
    "primary_email": "contact@apexcleanersdallas.com",
    "socials": {
      "linkedin": "https://www.linkedin.com/company/apexcleanersdallas",
      "facebook": "https://www.facebook.com/apexcleanersdallas",
      "instagram": "https://www.instagram.com/apexcleanersdallas",
      "twitter": "https://x.com/apexcleanersdallas",
      "youtube": "https://www.youtube.com/@apexcleanersdallas"
    },
    "rating": 4.8,
    "review_count": 84,
    "enriched": true,
    "scraped_at": "2026-10-27T02:44:37.935955+00:00"
  }
]
```

***

### 🚀 How to Run

#### 1. On Apify Platform

1. Navigate to the **B2B Local Business Leads & Email Contact Enricher** Actor page.
2. Enter your target **Business Query** and **Location**.
3. Choose your desired **Max Items** and ensure **Enrich Emails** and **Enrich Socials** are enabled.
4. Click **Start** and export your leads to CSV, JSON, or Excel.

#### 2. Via Apify API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")

run_input = {
    "query": "hvac contractors",
    "location": "Phoenix, AZ",
    "maxItems": 100,
    "enrichEmails": True,
    "enrichSocials": True,
}

run = client.actor("YOUR_USERNAME/b2b-local-business-enricher").call(run_input=run_input)

## Fetch leads from default dataset
leads = client.dataset(run["defaultDatasetId"]).list_items().items
for lead in leads:
    print(f"{lead['name']} | {lead['primary_email']} | {lead['phone']}")
```

#### 3. Via Apify API (JavaScript / Node.js)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_API_TOKEN' });

const run = await client.actor('YOUR_USERNAME/b2b-local-business-enricher').call({
    query: 'digital marketing agency',
    location: 'Austin, TX',
    maxItems: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Fetched ${items.length} enriched leads.`);
```

#### 4. Local CLI Mode

Run locally on your machine or in an automated CI/CD pipeline:

```bash
## Dry run output to stdout
uv run python -m src.main --dry-run --max-items 10

## Save leads directly to a JSON file
uv run python -m src.main --query "plumbers" --location "Miami, FL" --max-items 25 --output leads.json

## Disable social enrichment for faster runs
uv run python -m src.main --query "lawyers" --location "Chicago, IL" --no-enrich-socials --output lawyers.json
```

***

### 🛡️ Data Privacy & Ethical Outreach

This Actor only discovers and extracts publicly published business contact details directly provided on official company websites for business inquiries. It does not scrape password-protected accounts or private non-business communications. Ensure that your cold outreach complies with applicable communications regulations (CAN-SPAM, GDPR, CASL).

# Actor input Schema

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

Business category, industry keyword, or service (e.g., 'digital marketing agency', 'plumbers', 'software company', 'accounting').

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

Target geographic location or city and state/country (e.g., 'Austin, TX', 'Miami, FL', 'Chicago, IL', 'London, UK').

## `maxItems` (type: `integer`):

Maximum number of business leads to extract and enrich.

## `enrichEmails` (type: `boolean`):

Visit business websites to extract public contact emails

## `enrichSocials` (type: `boolean`):

Extract social profiles (LinkedIn, Facebook, Instagram, Twitter/X, YouTube)

## `dryRun` (type: `boolean`):

Execute in dry-run mode using realistic mock business lead data without sending outbound requests.

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

Optional Apify proxy configuration or custom proxy settings to ensure reliable scraping and avoid rate limiting.

## Actor input object example

```json
{
  "query": "digital marketing agency",
  "location": "Austin, TX",
  "maxItems": 50,
  "enrichEmails": true,
  "enrichSocials": true,
  "dryRun": false
}
```

# Actor output Schema

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

No description

# 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("thomas_shelby_0010/b2b-local-business-enricher").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("thomas_shelby_0010/b2b-local-business-enricher").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 thomas_shelby_0010/b2b-local-business-enricher --silent --output-dataset

```

## MCP server setup

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

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/h5pD64VpQ6rQ9IcIk/builds/0AZbEIUuesbORBt4D/openapi.json
