# Company Contact Pipeline (`leadharbor/company-contact-pipeline`) Actor

Domain in, own-domain contacts out: emails found on the company website, phone numbers, socials, and an MX check per email address.

- **URL**: https://apify.com/leadharbor/company-contact-pipeline.md
- **Developed by:** [Mohammed Samaan](https://apify.com/leadharbor) (community)
- **Categories:** Lead generation, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 company enricheds

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?

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

## Company Contact Pipeline

Give it a list of company domains. You get one row per company with the email addresses found on the company's own website, each one MX-checked, plus validated phone numbers and social links when the site shows them. A company where nothing usable is found is returned with its errors and is never charged.

### What it does

For each domain the Actor runs three steps and merges the answers into one row:

1. **Extract**: our `website-contact-extractor` reads the public pages of the website and returns email addresses, phone numbers, social links and, when a page names one, a contact person.
2. **Filter**: only addresses on the company's own domain (or a subdomain) are kept. Template placeholders such as `email@gmail.com` and escaped prefixes such as `u003e` are cleaned or dropped. Phone numbers are kept only in international format (`+` and 8-15 digits).
3. **MX check**: our `bulk-email-verifier` checks each kept address at MX level (does the domain have a mail server, is it a throwaway domain, is it a role address like info@).

The helper actors run inside your account with the run's own token. Their charges appear on your Apify bill next to this Actor's fee (see Pricing).

### Input

```json
{
  "companies": ["stripe.com", "monzo.com"],
  "maxContactsPerCompany": 3,
  "concurrency": 3
}
```

| Field | Default | Meaning |
|---|---|---|
| `companies` | required | Up to 100 domains or URLs per run, one per line. |
| `maxContactsPerCompany` | `3` | Maximum email addresses returned per company (1-10). |
| `concurrency` | `3` | Companies processed in parallel (1-5). |

Accepted lines: `example.com` or `https://example.com/page`. A company name on its own (`Acme Corp`), `Name, City` and `Name | domain.com` are **not** supported: the row comes back as `invalid-input` with a message asking for a domain, and nothing is charged or spent on helper actors. Private, loopback and link-local addresses (`127.0.0.1`, `169.254.169.254`, names that resolve to them) are refused the same way.

### Output

One dataset row per input line. The shape (field names and layout) is below; the values are placeholders, not a recorded result.

```json
{
  "input": "example.com",
  "domain": "example.com",
  "status": "enriched",
  "contacts": [
    {
      "email": "hello@example.com",
      "mxOk": true,
      "status": "risky",
      "score": 63,
      "reason": "role_address",
      "contactName": null,
      "contactRole": null,
      "phone": null
    }
  ],
  "phones": ["+1 555 010 0000"],
  "socials": { "facebook": null, "instagram": null, "linkedin": "https://www.linkedin.com/company/example", "twitter": null },
  "errors": {},
  "sourceRuns": [
    { "stage": "contacts", "runId": "...", "status": "SUCCEEDED" },
    { "stage": "verification", "runId": "...", "status": "SUCCEEDED" }
  ],
  "charged": true
}
```

Fields:

- `status`: `enriched` (at least one contact passed the MX check), `no-data` (no own-domain email found, no contact passed the MX check, or a stage failed), `invalid-input` (the line was rejected, nothing was spent), `error` (unexpected failure).
- `contacts[]`: `mxOk` is `true` when the domain has a mail server, the address is well-formed and it is not a throwaway domain. `status`, `score` and `reason` come from the email checker. `contactName`, `contactRole` and `phone` are filled only for the best address and only when the website exposes them.
- `phones`: validated international numbers from the extractor, de-duplicated. Empty when the site shows none in that format.
- `errors`: one message per failed stage (`input`, `domain`, `contacts`, `verification`).
- `sourceRuns`: the run ids of every helper run, so each number can be traced.
- `charged`: `true` when this row was billed as `company-enriched`.

#### What "mx-ok" means

The check is MX-level only: the domain can receive mail, and the address is not a throwaway or malformed. The mailbox itself is **not** contacted, so this Actor does not tell you whether a particular address exists. A `status` of `unknown` with reason `mx_only_by_setting` means exactly that.

### Pricing

Pay per event.

| Event | Price | When |
|---|---|---|
| Actor start | $0.001 | once per run |
| Company enriched | $0.012 | once per company that returned at least one contact with `mxOk: true` |

Not charged: invalid input, companies with no contact found, companies where a stage failed and no contact passed the MX check.

The helper actors are billed to your Apify account by their own published prices, in addition to the fee above:

| Helper | Price | Per company |
|---|---|---|
| website-contact-extractor | $0.005 per website | $0.005 |
| bulk-email-verifier | $0.0005 per address | $0.0005-0.0015 (1-3 addresses) |

Estimate derived from those published prices (plus the helpers' start fees): about $0.0067 of helper cost per company, so roughly $0.019 per company in total with 3 contacts ($0.012 + about $0.0067). This is an estimate, not a measured invoice. Each helper run is capped (extractor $0.04, email check $0.02), but your own per-run maximum cost setting limits only this Actor's fee, not the helper runs.

### Limits you should know

- Domains and URLs only, up to 100 companies per run. Company names are not looked up.
- Public pages only: no logins, no cookies.
- Contacts come from the pages of one website. If the site hides its emails behind JavaScript or contact forms, `contacts` is empty and the row is `no-data` (not charged).
- The extractor returns `contactName` and `contactRole` rarely; expect them to be `null` for most companies.
- MX-only: `mx-ok` means the domain can receive mail and nothing more. No mailbox check is made.
- The helper actors are billed to your account separately from this Actor's fee, and they run on your account's memory allowance. If you hit it, a helper start is retried for about a minute and then reported as an error for that company.

### FAQ

**Can I give a company name?** No. Give a domain or URL. A name-only line is returned as `invalid-input` and is free.

**Why was my company not charged?** Either nothing usable was found (`no-data`), the input was invalid, or a helper failed before any contact passed the MX check. The reason is in `errors`.

**Why are some emails missing from `contacts`?** Only addresses on the company's own domain are kept, up to `maxContactsPerCompany`. Addresses on other domains, such as a gmail.com address in a footer, are dropped.

**Does `mxOk: true` mean the person will receive my message?** No. It means the address's domain has a mail server and is not a throwaway domain. The mailbox is not contacted.

**Where do the numbers on my bill come from?** This Actor's fee (start + `company-enriched`) plus the two helper actors' own charges, each listed in your account's usage under the helper's name. The `sourceRuns` ids let you find each helper run.

# Actor input Schema

## `companies` (type: `array`):

One domain or URL per line (stripe.com or https://stripe.com/contact). Company names are not supported: a line that is not a domain is returned as invalid-input and not charged.

## `maxContactsPerCompany` (type: `integer`):

Maximum email addresses returned per company (1-10).

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

1-5. Each company starts up to two helper runs, and your account's memory limit applies to them.

## Actor input object example

```json
{
  "companies": [
    "stripe.com",
    "monzo.com"
  ],
  "maxContactsPerCompany": 3,
  "concurrency": 3
}
```

# Actor output Schema

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

One row per company: contacts, phones, socials, sub-run ids and errors per stage.

## `resultsUi` (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 = {
    "companies": [
        "stripe.com",
        "monzo.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leadharbor/company-contact-pipeline").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 = { "companies": [
        "stripe.com",
        "monzo.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("leadharbor/company-contact-pipeline").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 '{
  "companies": [
    "stripe.com",
    "monzo.com"
  ]
}' |
apify call leadharbor/company-contact-pipeline --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,leadharbor/company-contact-pipeline"
        }
    }
}
```

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/MU13qEH6LqiDaIhV1/builds/ZI1IYJDeFshiNfYMc/openapi.json
