# B2B Contact, Email, Phone & Social Profile Extractor (`deliberate_gratitude_shj/b2b-contact-social-extractor`) Actor

Fast, zero-browser B2B lead enrichment API that crawls homepages plus /contact, /about, /team, and /imprint pages in 128 MB RAM to extract deduplicated emails (role vs. personal), phones, 7 social networks, company metadata, and JSON-LD addresses.

- **URL**: https://apify.com/deliberate_gratitude_shj/b2b-contact-social-extractor.md
- **Developed by:** [Apex Automation Labs](https://apify.com/deliberate_gratitude_shj) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 domains scraped

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

## B2B Website Email & Contact Extractor API (Phones, Socials & JSON-LD)

Extract **verified, deduplicated emails (tagged `role` vs. `personal`)**, **normalized phone numbers**, **social profile URLs across 7 networks** (`LinkedIn`, `X/Twitter`, `Instagram`, `Facebook`, `YouTube`, `GitHub`, `TikTok`), **company name**, **meta description**, and **structured `Organization` / `LocalBusiness` JSON-LD address & contact metadata** from any list of company domains or URLs—at **$2.00 per 1,000 domains** (`$0.002 / domain`, **$0 start fee**) inside **128 MB RAM**.

Built by **Apex Automation Labs** for **B2B lead enrichment**, **CRM data hygiene**, **n8n & Make.com pipelines**, and **AI sales & research agents (MCP)**.

#### Verified Apify Cloud Benchmark (128 MB RAM)

- **Live Cloud Run (`fOnauD1P07OMfSuCB`):** Crawled 5 real B2B domains (`apify.com`, `hubspot.com`, `basecamp.com`, `ycombinator.com`, `resend.com` including contact/about/legal subpages) in **14.93s total** (**5.06s** extraction time), extracting **16 emails**, **56 phone numbers**, and **42 social links**.
- **Memory Footprint:** **101.1 MB peak RAM** (`106,041,344` bytes) inside a `128 MB` container.
- **Compute Efficiency:** **`0.0005184` Compute Units** (`~0.1037 CU / 1,000 domains`, **$0.000242** platform cost, **97.6%–99.0% net compute margin**).

***

### Zero-Browser HTTP API vs Headless Browser Scrapers

| Metric / Capability | B2B Website Email & Contact Extractor (This Actor) | Headless Browser Contact Scrapers (Playwright / Puppeteer) |
|---|---|---|
| **Container RAM Footprint** | **101.1 MB peak** (runs in **128 MB RAM**) | 1,024–4,096 MB RAM per browser container |
| **Multi-Page Extraction Speed** | **5.06s extraction** (14.93s total for 5 domains × subpages) | 45–120+ seconds (browser boot + subpage navigation) |
| **Compute Cost per 1,000 Domains** | **~0.1037 CU** (~$0.041 Apify compute) | 0.50–2.00+ CU ($0.20–$0.80+ compute) |
| **Pricing per 1,000 Domains** | **$2.00 / 1,000 domains** (`$0` start fee) | $4.00–$15.00+ / 1,000 domains |
| **Email Noise & Asset Filtering** | Strips `.png`/`@2x`/`sentry.io` false positives; decodes Cloudflare `data-cfemail`; tags `role` vs. `personal` | Regex dumps raw noise from JS/CSS asset URLs |
| **7-Network Social Canonicalization** | Normalizes `LinkedIn`, `X`, `Instagram`, `Facebook`, `YouTube`, `GitHub`, `TikTok` and removes share widgets | Captures broken share/intent popups as profile URLs |
| **JSON-LD Organization Extraction** | Parses `Organization`/`LocalBusiness` legal name, postal address & `contactPoints` | Typically ignores structured JSON-LD scripts |

***

### Key Capabilities & Smart Multi-Page Discovery

- **Smart High-Value Subpage Discovery:** Crawls each domain's homepage plus auto-discovered `/contact`, `/contact-us`, `/about`, `/about-us`, `/team`, `/imprint`, and `/legal` pages (up to `maxPagesPerDomain`, default `4`) using bounded 1.2 MB HTML streaming and strict timeouts.
- **Zero-Noise Email Classification:** Extracts `mailto:` links, visible text, JSON-LD `email`, and Cloudflare `data-cfemail`, filters false positives, and tags every address as **`role`** (`sales`, `support`, `info`, `press`, `hr`, `legal`, `security`, `billing`, `marketing`, `partnership`, `executive`) or **`personal`**.
- **7-Network Social Canonicalization:** Deduplicates profile links across `<a>`, `<meta>`, and JSON-LD `sameAs` for all 7 major networks.
- **Structured `Organization` / `LocalBusiness` JSON-LD:** Extracts `legalName`, `streetAddress`, `postalCode`, `addressCountry`, `foundingDate`, and `contactPoints`.

***

### Quick Start Input JSON

Click **Start** immediately using the built-in defaults, or paste this JSON:

```json
{
  "domains": [
    "apify.com",
    "posthog.com",
    "basecamp.com",
    "supabase.com",
    "resend.com"
  ],
  "maxDomains": 50,
  "maxPagesPerDomain": 4,
  "includeSubpages": true,
  "includeStructuredData": true,
  "includeDetailedMatches": true,
  "concurrency": 4,
  "timeoutMs": 8000
}
```

#### Key Input Parameters

- **`domains`**: Array of raw domains (`apify.com`), full URLs (`https://posthog.com/about`), or `{"domain": "..."}` objects. Normalized and deduplicated automatically.
- **`maxDomains`**: Strict Pay-Per-Event cap (`1`–`5000`, default `50`).
- **`maxPagesPerDomain`**: Maximum HTML pages crawled per domain (`1`–`10`, default `4`).
- **`includeSubpages`**: Auto-discover and crawl `/contact`, `/about`, `/team`, `/imprint`, and `/legal`. Set to `false` for homepage-only mode.
- **`includeStructuredData`**: Extract `Organization` / `LocalBusiness` JSON-LD addresses and contact points.
- **`includeDetailedMatches`**: Set to `false` to omit `emailsDetailed` and `phonesDetailed` arrays for compact MCP/LLM payloads.

***

### Sample Output JSON (Verified Live Cloud Run)

```json
{
  "domain": "apify.com",
  "apexDomain": "apify.com",
  "inputValue": "apify.com",
  "reachable": true,
  "httpStatusCode": 200,
  "finalUrl": "https://apify.com/",
  "companyName": "Apify",
  "metaDescription": "Apify is a full-stack platform for web scraping and browser automation.",
  "primaryEmail": "hello@apify.com",
  "emails": ["hello@apify.com", "support@apify.com"],
  "roleEmails": ["hello@apify.com", "support@apify.com"],
  "personalEmails": [],
  "emailsDetailed": [
    {
      "email": "hello@apify.com",
      "type": "role",
      "roleCategory": "info",
      "isSameDomain": true,
      "sources": ["https://apify.com/contact"]
    }
  ],
  "phones": ["+1 888-555-0199"],
  "linkedinUrl": "https://www.linkedin.com/company/apifytech",
  "twitterUrl": "https://x.com/apify",
  "socials": {
    "linkedin": ["https://www.linkedin.com/company/apifytech"],
    "twitter": ["https://x.com/apify"],
    "instagram": [],
    "facebook": [],
    "youtube": ["https://www.youtube.com/@apify"],
    "github": ["https://github.com/apify"],
    "tiktok": []
  },
  "socialLinksCount": 4,
  "pagesCrawledCount": 4,
  "pagesCrawled": [
    "https://apify.com/",
    "https://apify.com/contact",
    "https://apify.com/about",
    "https://apify.com/legal"
  ],
  "errors": []
}
```

***

### MCP & n8n Quick-Start

#### Native MCP Integration (`mcp.apify.com`)

Connect this Actor directly to **Claude Desktop**, **Cursor**, or **Windsurf** via Apify's official Streamable HTTP MCP server. Replace `<YOUR_APIFY_TOKEN>` with your Apify API token.

##### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "apify-b2b-contacts": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.apify.com/?actors=deliberate_gratitude_shj/b2b-contact-social-extractor",
        "--header",
        "Authorization: Bearer <YOUR_APIFY_TOKEN>"
      ]
    }
  }
}
```

##### Cursor (`.cursor/mcp.json`) & Windsurf (`mcp_config.json`)

```json
{
  "mcpServers": {
    "apify-b2b-contacts": {
      "url": "https://mcp.apify.com/?actors=deliberate_gratitude_shj/b2b-contact-social-extractor",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

*(In Windsurf `~/.codeium/windsurf/mcp_config.json`, replace `"url"` with `"serverUrl"`.)*

##### Ready-to-Use AI Agent Prompts

1. **Lead Contact Enrichment:** *"Use `b2b-contact-social-extractor` on `["posthog.com", "supabase.com", "resend.com"]` and extract their primary `sales`/`support` role emails, LinkedIn URLs, GitHub orgs, and headquarters addresses."*
2. **Compact CRM Hygiene Check:** *"Enrich these 20 prospect domains with `includeDetailedMatches: false` and output a clean table of `domain`, `primaryEmail`, `phones`, and `linkedinUrl`."*

#### n8n & Make.com Synchronous API Setup

Import-ready workflow JSON is available in [`distribution/n8n_workflow.json`](https://github.com/tikzyre8-cmyk/b2b-contact-social-extractor/blob/main/distribution/n8n_workflow.json).

- **Method:** `POST`
- **URL:** `https://api.apify.com/v2/acts/deliberate_gratitude_shj~b2b-contact-social-extractor/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>`
- **Headers:** `Content-Type: application/json`
- **Body:**

```json
{
  "domains": ["apify.com", "posthog.com", "basecamp.com"],
  "maxPagesPerDomain": 4,
  "includeSubpages": true,
  "includeStructuredData": true
}
```

- **Make.com:** Add **Apify -> Run an Actor** (`deliberate_gratitude_shj/b2b-contact-social-extractor`, **Run synchronously** enabled), then push clean emails, phones, and social URLs into HubSpot, Pipedrive, Airtable, or Google Sheets.

***

### Transparent Pay-Per-Event Pricing

Simple, predictable **Pay-Per-Event (PPE)** billing — **$0.00 actor start fee** and **$0.002 per scraped domain** ($2.00 per 1,000 domains). Test free with Apify's monthly $5 free developer credit (up to 2,500 domains/month free).

| Domains Scraped | Event Rate (`domain-scraped`) | Estimated Total Cost |
|---:|---:|---:|
| **5 domains** (Quick Test) | $0.002 / domain | **$0.01** |
| **50 domains** (Default Batch) | $0.002 / domain | **$0.10** |
| **1,000 domains** | $0.002 / domain | **$2.00** |
| **5,000 domains** | $0.002 / domain | **$10.00** |

*Set `maxDomains` or Apify's `maxTotalChargeUsd` budget limit for exact spend control.*

***

### Frequently Asked Questions (FAQ)

**1. How does this contact extractor avoid false-positive emails like `@2x.png` or `sentry.io`?**\
It applies strict extension and vendor-domain blacklists, ignores asset filenames (`@2x`, `.png`, `.jpg`, `.svg`, `.webp`), filters placeholder domains (`example.com`, `wixpress.com`), and validates email structure before classifying each address as `role` or `personal`.

**2. Does it decode Cloudflare-obfuscated `data-cfemail` links without a browser?**\
Yes. When a site uses Cloudflare email obfuscation (`__cf_email__` / `data-cfemail`), the parser decodes the XOR hex payload in pure TypeScript with zero browser rendering.

**3. How does subpage discovery find contact pages on different sites?**\
Alongside the homepage, it inspects internal navigation and footer links matching `/contact`, `/contact-us`, `/about`, `/about-us`, `/team`, `/imprint`, and `/legal`, crawling up to `maxPagesPerDomain` pages per domain.

**4. Why does it keep memory under 128 MB RAM even when crawling multiple pages per domain?**\
Each HTTP response uses bounded streaming (`1.2 MB` cap) with strict `AbortController` timeouts (`timeoutMs`) so massive assets or slow third-party widgets never blow up container memory.

**5. Can I verify email deliverability (MX, SPF, DMARC) and tech stack for the same domains?**\
Yes—pair this Actor with our [Domain Security & Tech Stack API](https://apify.com/deliberate_gratitude_shj/domain-intel-api) (`\$2.00 / 1k domains`) to check `Google Workspace` / `Microsoft 365` MX hosts, SPF/DMARC scores (`0–100`), RDAP domain age, and tech stacks.

***

### More Fast Zero-Browser Tools by Apex Automation Labs

| Tool | Primary Use Case | Pricing (PPE, $0 Start) | Verified Peak RAM & Speed | Apify Store Link |
|---|---|---|---|---|
| **ATS Job Board Scraper API** | Greenhouse, Lever, Ashby, Workable, SmartRecruiters & `/careers` discovery | **$2.00 / 1k jobs** | 75.1 MB RAM · 3.39s (3 boards) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/ats-jobs-extractor) |
| **Technical SEO Broken Link Checker** | 4xx/5xx links, `#fragment` anchors, redirects, JSON-LD & `llms.txt` | **$2.00 / 1k pages** | 59.1 MB RAM · 4.23s (5 pages) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/http-seo-link-auditor) |
| **Domain Security & Tech Stack API** | DNS, email host, SPF/DMARC score, RDAP age, SSL/TLS & CDN stack | **$2.00 / 1k domains** | 58.5 MB RAM · 2.45s analysis (5 domains) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/domain-intel-api) |
| **Shopify Product & Price Scraper API** | Catalogs, variants, compare-at discounts, SKUs, stock & sitemaps | **$1.00 / 1k products** | 54.1 MB RAM · 2.59s (30 products) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/shopify-catalog-monitor) |
| **Website to Markdown Crawler (RAG & n8n)** | Clean LLM Markdown, token counts, boilerplate stripping & `/llms.txt` | **$1.00 / 1k pages** | 39.8 MB RAM · 2.97s (5 sites) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/fast-http-markdown-crawler) |
| **Universal E-Commerce JSON-LD Price Scraper** | Cross-platform JSON-LD (`Product`/`ProductGroup`), OG & Microdata | **$1.50 / 1k products** | 39.7 MB RAM · 2.91s (3 fast URLs) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/universal-ecommerce-schema-api) |

*Explore the open-source portfolio hub on GitHub: [Apex Automation Labs (`tikzyre8-cmyk`)](https://github.com/tikzyre8-cmyk/tikzyre8-cmyk) · [All Actors on Apify Store](https://apify.com/deliberate_gratitude_shj).*

# Actor input Schema

## `domains` (type: `array`):

List of company domains or URLs to crawl (e.g. apify.com, https://posthog.com/about). Inputs are automatically normalized and deduplicated.

## `maxDomains` (type: `integer`):

Maximum number of unique domains to crawl in this run. Acts as a strict Pay-Per-Event spending cap.

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

Maximum pages crawled per domain, starting with the homepage plus auto-discovered /contact, /contact-us, /about, /about-us, /team, /imprint, and /legal pages.

## `includeSubpages` (type: `boolean`):

Crawl auto-discovered and standard /contact, /about, /team, /imprint, and /legal pages up to maxPagesPerDomain. Disable for homepage-only extraction.

## `includeStructuredData` (type: `boolean`):

Parse Organization and LocalBusiness JSON-LD schemas for legal name, postal address, founding date, and structured contactPoints.

## `includeDetailedMatches` (type: `boolean`):

Include emailsDetailed (with role/personal classification & source URLs) and phonesDetailed. Disable for ultra-compact MCP/LLM payloads.

## `concurrency` (type: `integer`):

Maximum number of domains crawled in parallel.

## `timeoutMs` (type: `integer`):

Strict HTTP timeout in milliseconds per page request so dead or slow domains never stall the batch.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "posthog.com",
    "basecamp.com",
    "supabase.com",
    "resend.com"
  ],
  "maxDomains": 50,
  "maxPagesPerDomain": 4,
  "includeSubpages": true,
  "includeStructuredData": true,
  "includeDetailedMatches": true,
  "concurrency": 4,
  "timeoutMs": 8000
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {
    "domains": [
        "apify.com",
        "posthog.com",
        "basecamp.com",
        "supabase.com",
        "resend.com"
    ],
    "maxDomains": 50,
    "maxPagesPerDomain": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("deliberate_gratitude_shj/b2b-contact-social-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 = {
    "domains": [
        "apify.com",
        "posthog.com",
        "basecamp.com",
        "supabase.com",
        "resend.com",
    ],
    "maxDomains": 50,
    "maxPagesPerDomain": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("deliberate_gratitude_shj/b2b-contact-social-extractor").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 '{
  "domains": [
    "apify.com",
    "posthog.com",
    "basecamp.com",
    "supabase.com",
    "resend.com"
  ],
  "maxDomains": 50,
  "maxPagesPerDomain": 4
}' |
apify call deliberate_gratitude_shj/b2b-contact-social-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deliberate_gratitude_shj/b2b-contact-social-extractor"
        }
    }
}
```

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/KcK0HeoGaOza1Jb5Q/builds/o08pcgG8Cj6OcfAhP/openapi.json
