# B2B Lead & Email Enricher: Phones, Address & Socials (`believable_flipflops_gzz/b2b-contact-enricher`) Actor

Enrich company domains with direct decision-maker emails (with Cloudflare bypass), phone numbers, physical addresses, contact form URLs, and 7 socials. Ultra-fast and 90% cheaper compute units without heavy browsers.

- **URL**: https://apify.com/believable\_flipflops\_gzz/b2b-contact-enricher.md
- **Developed by:** [Mohammad Aliyan](https://apify.com/believable_flipflops_gzz) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## B2B Domain Contact & Decision-Maker Enricher (Apify Actor)

A high-performance, production-ready Apify Actor written in Python, designed to enrich B2B domains with direct decision-maker contact details (emails, phone numbers, and social profiles) with **ultra-low Compute Unit (CU) consumption** and memory usage strictly under 256MB.

***

### 🚀 Key Features

- **Ultra-Low CU Footprint**: Operates purely on lightweight asynchronous HTTP requests (`aiohttp` + `BeautifulSoup4` + `lxml`). Absolutely **no headless browsers** (no Playwright/Selenium/Puppeteer), slashing Apify run costs by over 90%.
- **Intelligent Page Discovery**: Fetches the homepage and discovers internal links matching `/contact`, `/contact-us`, `/about`, `/about-us`, `/team`, `/our-team`, `/leadership`, `/people`, etc., crawling up to 3 highest-priority subpages concurrently per domain.
- **Smart Email Classification & Scoring**:
  - Distinguishes **Direct/Personal Emails** (e.g. `john@`, `j.smith@`, `sarah.k@`, `first.last@company.com`) from **Generic Inboxes** (`info@`, `support@`, `sales@`, `admin@`, etc.).
  - Filters out false positives (e.g. image extensions `.png`, `.svg`, `.jpg`, `.css` and vendor/test domains like `example.com`, `sentry.io`, `wixpress.com`, `shopify.com`).
  - Calculates confidence scores to nominate a `primary_direct_email`.
- **Social Profile & Phone Extraction**:
  - Cleans and normalizes profile and company URLs for **LinkedIn**, **Twitter/X**, **Instagram**, and **Facebook** (strips tracking parameters, share dialogs, and internal platform pages).
  - Extracts and validates international phone numbers via `tel:` links and regex patterns.
- **Async Worker Pool & Proxy Integration**:
  - Native Apify proxy rotation with `Actor.create_proxy_configuration()`.
  - Queue-based worker pool with configurable concurrency (default: 15 workers) and 10s strict page timeouts.
- **Fault-Tolerant Execution**:
  - Individual domain timeouts, 403 Forbidden, or connection failures are logged and recorded with descriptive statuses (`Failed: Timeout`, `Failed: Forbidden`, etc.) without stopping or crashing the batch.

***

### 📥 Input Schema

Configure the Actor via Apify Console or JSON input:

```json
{
  "startUrls": [
    { "url": "https://apify.com" },
    { "url": "https://stripe.com" },
    { "url": "openai.com" }
  ],
  "maxConcurrency": 15,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

#### Parameters:

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrls` | Array | Yes | — | List of target domains or URLs (supports Google Maps exports, CRM lists, string URLs, or Apify request objects). |
| `maxConcurrency` | Integer | No | `15` | Concurrency limit for the worker pool (10-20 recommended for minimal memory). |
| `proxyConfiguration` | Object | No | `{"useApifyProxy": true}` | Apify Proxy configuration (residential or datacenter). |

***

### 📤 Output Schema

Each processed domain outputs a structured record to the default Apify Dataset:

```json
{
  "domain": "example-corp.com",
  "website_status": "OK",
  "primary_direct_email": "john.smith@example-corp.com",
  "all_direct_emails": [
    "john.smith@example-corp.com",
    "sarah.k@example-corp.com"
  ],
  "generic_emails": [
    "contact@example-corp.com",
    "info@example-corp.com"
  ],
  "phone_numbers": [
    "+1-555-019-2834"
  ],
  "linkedin_urls": [
    "https://www.linkedin.com/company/example-corp"
  ],
  "social_profiles": {
    "linkedin": [
      "https://www.linkedin.com/company/example-corp"
    ],
    "twitter": [
      "https://x.com/examplecorp"
    ],
    "instagram": [
      "https://www.instagram.com/examplecorp/"
    ],
    "facebook": [
      "https://www.facebook.com/examplecorp"
    ]
  },
  "scraped_at": "2026-09-06T10:55:00.123456+00:00"
}
```

For unreachable or failed domains:

```json
{
  "domain": "offline-domain.com",
  "website_status": "Failed: Timeout",
  "primary_direct_email": null,
  "all_direct_emails": [],
  "generic_emails": [],
  "phone_numbers": [],
  "linkedin_urls": [],
  "social_profiles": {
    "linkedin": [],
    "twitter": [],
    "instagram": [],
    "facebook": []
  },
  "scraped_at": "2026-09-06T10:55:00.123456+00:00"
}
```

***

### 🛠️ Local Development & Testing

#### 1. Install Dependencies

```bash
pip install -r requirements.txt
```

#### 2. Run Locally with Apify CLI

```bash
apify run -p
```

Or directly using Python with environment variables:

```bash
python main.py
```

***

### 🚢 Deploy to Apify

Push directly using the Apify CLI:

```bash
apify login
apify push
```

Or connect your GitHub repository to your Apify Actor dashboard for automated builds.

# Actor input Schema

## `startUrls` (type: `array`):

List of target website URLs or domains (e.g. from Google Maps or CRM exports) to enrich with contact details.

## `maxConcurrency` (type: `integer`):

Maximum number of domains processed concurrently by the worker pool.

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

Select Apify Proxy or custom proxies.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxConcurrency": 15,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all enriched B2B domains with emails, phones, socials, and addresses.

# 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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("believable_flipflops_gzz/b2b-contact-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 = { "startUrls": [{ "url": "https://apify.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("believable_flipflops_gzz/b2b-contact-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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ]
}' |
apify call believable_flipflops_gzz/b2b-contact-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,believable_flipflops_gzz/b2b-contact-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/rpQKfAXgmf9zlHzEr/builds/i4vfLQCbOQmw7ft8v/openapi.json
