# B2B Contact & Email Extractor (`tyegen/universal-b2b-contact-extractor`) Actor

Extract emails, phone numbers, and social media profiles from any list of company websites. Designed for Lead Generation and Cold Emailing.

- **URL**: https://apify.com/tyegen/universal-b2b-contact-extractor.md
- **Developed by:** [Tan Yegen](https://apify.com/tyegen) (community)
- **Categories:** Developer tools, Lead generation, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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/platform/actors/running/actors-in-store#pay-per-event

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

## 🎯 Universal B2B Contact & Email Extractor

### 🤖 Copy to your AI assistant
Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```text
tyegen/universal-b2b-contact-extractor on Apify. Call: ApifyClient("TOKEN").actor("tyegen/universal-b2b-contact-extractor").call(run_input={"startUrls": ["URL_HERE"]}), then client.dataset(run["defaultDatasetId"]).list_items().items for results.
````

The ultimate, high-speed Lead Generation machine. Feed it a list of company website domains, and it will autonomously navigate their pages to return **Emails, Phone Numbers, and Social Media Profiles** (LinkedIn, Twitter, Instagram, Facebook, YouTube).

### 🚀 How It Works (The "Sniper" Approach)

When building a B2B pipeline with thousands of domains, manually opening each website to find their `info@company.com` email or LinkedIn company page is soul-crushing. Traditional web scrapers try to solve this by crawling *every single page* on a website. That wastes massive amounts of time and Apify Compute Units, often getting blocked by firewalls in the process.

**This actor acts like a Sniper:**

1. It visits the homepage and scans for immediate contact info.
2. It analyzes the site's navigation and *intelligently* clicks only on high-value targets like `/contact`, `/about-us`, `/our-team`, or `/iletisim`.
3. It applies advanced Regular Expressions (RegEx) to extract and validate emails and phone numbers.
4. It merges all discovered data from these pages into a **single, unified, and clean row per company**.

#### ✨ Key Advantages

- **Unmatched Speed:** Built on `CheerioCrawler` using raw HTTP requests. It can scan thousands of company websites in minutes, not hours.
- **Smart Noise Filtering:** Automatically detects and ignores fake/system emails like `image@2x.png`, `sentry@...`, `wix@...`, or generic placeholder emails.
- **Aggregated Single-Row Output:** It doesn't flood your database with duplicate rows for every page it visits. You get exactly *one* highly enriched row per domain.
- **Resource Friendly:** By limiting scans to a maximum of 3-5 pages per domain, it keeps your compute costs near zero.

### 🎯 Who is this for?

- **Sales & SDR Teams (Cold Emailing):** Build highly targeted, accurate outbound email lists from your prospect accounts.
- **Growth Marketers:** Enrich your CRM platforms (Salesforce, HubSpot, Pipedrive) with missing company phone numbers and LinkedIn profiles.
- **Recruiters & HR:** Find direct contact lines to agencies or targeted companies.
- **Market Researchers:** Automatically gather competitor social media landscapes at scale.

### 💰 Pricing & ROI

**Pay-Per-Result:** Only **$2.00 per 1,000 domains**.
Considering the lifetime value (LTV) of a single B2B lead, extracting thousands of verified company contacts for just a few dollars is an incredible ROI for your outbound campaigns.

***

### 📥 Input Configuration

| Field | Type | Description |
| ----- | ---- | ----------- |
| `startUrls` | Array | A list of company domains you want to scan (e.g., `https://stripe.com`, `https://apify.com`). |
| `maxPagesPerDomain` | Integer | (Default: 3). How many pages to scan per company. 3 is usually the sweet spot to find the Contact/About pages without wasting time. |
| `proxyConfiguration` | Object | Standard Apify Datacenter proxies are highly recommended to avoid basic IP bans. |

***

### 📤 Output Schema (Clean & Aggregated)

For each company domain, you will receive exactly ONE object with aggregated data.

| Field | Type | Description |
| ----- | ---- | ----------- |
| `domain` | String | The clean domain name (e.g., `apify.com`). |
| `website` | String | The full URL of the scanned company. |
| `emails` | Array | List of unique, validated email addresses found on the site. |
| `phones` | Array | List of unique phone numbers found via `tel:` tags. |
| `linkedin` | String | URL to the company's LinkedIn page. |
| `twitter` | String | URL to the company's Twitter/X profile. |
| `instagram` | String | URL to the company's Instagram profile. |
| `facebook` | String | URL to the company's Facebook page. |
| `youtube` | String | URL to the company's YouTube channel. |

#### 💡 Output Example

```json
{
  "domain": "apify.com",
  "website": "https://apify.com",
  "emails": [
    "info@apify.com",
    "support@apify.com"
  ],
  "phones": [
    "+1-800-555-0199"
  ],
  "linkedin": "https://www.linkedin.com/company/apifytech",
  "twitter": "https://twitter.com/apify",
  "instagram": "https://www.instagram.com/apifytech/",
  "facebook": "https://www.facebook.com/apifytech",
  "youtube": "https://www.youtube.com/c/Apify"
}
```

# Actor input Schema

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

Add one or more company domains (e.g., https://apple.com).

## `maxPagesPerDomain` (type: `integer`):

How many pages to scan per company? (Usually 3-5 is enough to find contact info).

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

Proxy settings. Datacenter proxies are highly recommended.

## Actor input object example

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

# 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"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tyegen/universal-b2b-contact-extractor").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" }],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=tyegen/universal-b2b-contact-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "B2B Contact & Email Extractor",
        "description": "Extract emails, phone numbers, and social media profiles from any list of company websites. Designed for Lead Generation and Cold Emailing.",
        "version": "1.0",
        "x-build-id": "U5aqu3edtnaZhlL6U"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/tyegen~universal-b2b-contact-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-tyegen-universal-b2b-contact-extractor",
                "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/tyegen~universal-b2b-contact-extractor/runs": {
            "post": {
                "operationId": "runs-sync-tyegen-universal-b2b-contact-extractor",
                "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/tyegen~universal-b2b-contact-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-tyegen-universal-b2b-contact-extractor",
                "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": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Company URLs",
                        "type": "array",
                        "description": "Add one or more company domains (e.g., https://apple.com).",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxPagesPerDomain": {
                        "title": "Max Pages to Scan Per Domain",
                        "type": "integer",
                        "description": "How many pages to scan per company? (Usually 3-5 is enough to find contact info).",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Datacenter proxies are highly recommended."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
