# Company Contact Finder: Role Emails, Phones & Socials (`hani-tools/company-contact-finder`) Actor

Find public company role contacts (info@, sales@, support@), main phone, address and official socials from the company website. Personal-name emails never collected. Source page + MX check. Respects robots.txt. Pay only for domains with a contact found.

- **URL**: https://apify.com/hani-tools/company-contact-finder.md
- **Developed by:** [HaniDev](https://apify.com/hani-tools) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 domain with contact founds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Finder: Role Emails, Phones & Socials

Get each company's **public role contacts** (info@, sales@, support@, press@ …), main phone numbers, postal address and
official social profiles **from the company's own website**. Personal-name emails are never collected. Every contact
comes with the page it was found on, and every email domain is checked for working mail servers (MX).
Respects robots.txt, uses no proxies. **You pay only for domains where a usable role email was found: $0.002 per
domain with a contact.**

### What this Actor does not do

- It never collects or returns personal-name emails (jane@, j.smith@), and it does not extract people, names or job titles.
- No login, no proxy, no CAPTCHA or bot-protection bypass. robots.txt is always respected; blocked sites are not retried.
- No mailbox (SMTP) verification and no sending of any kind.
- It reads only the company's own website (no search engines, social networks or third-party directories).

### What you get

One output row per input (website or dataset item), with:

| Field | What it is |
|---|---|
| `status` | `found`, `no_contact`, `blocked_robots`, `blocked`, `unreachable`, `invalid_input`, `duplicate`, `not_processed_limit` |
| `primaryEmail`, `emails[]` | Role addresses only, best first. Each has `role` (general, sales, support, …), `mx`, `sameDomain`, `freeMail`, `thirdParty`, `foundBy` and `source` (the page URL) |
| `primaryPhone`, `phones[]` | Up to 3 main numbers in E.164 format, from `tel:` links, structured data or clearly labelled text, each with its `source` |
| `socials` | Company profiles on LinkedIn, Facebook, Instagram, X, YouTube, TikTok, GitHub and Pinterest (no personal profiles, no share links) |
| `address` | Postal address, only when the site publishes it as structured data (JSON-LD / microdata) |
| `companyName` | From structured data, `og:site_name` or the page title |
| `withheld` | Counts of addresses that were found but **not** returned: personal-like, near an opt-out notice, junk, domain cannot receive mail |
| `billable`, `charged` | Whether the row meets the billing rule, and whether it was charged in this run |
| `inputRef` | For dataset input: dataset ID, item index and your pass-through fields, so you can join results back |

Example (shortened):

```json
{
  "input": "apify.com",
  "domain": "apify.com",
  "status": "found",
  "billable": true,
  "charged": true,
  "companyName": "Apify",
  "primaryEmail": "hello@apify.com",
  "emails": [
    { "email": "hello@apify.com", "role": "general", "mx": "mx", "sameDomain": true, "foundBy": "mailto", "source": "https://apify.com/contact" },
    { "email": "support@apify.com", "role": "support", "mx": "mx", "sameDomain": true, "foundBy": "jsonld", "source": "https://apify.com/" }
  ],
  "phones": [],
  "socials": { "linkedin": "https://linkedin.com/company/apify", "x": "https://x.com/apify", "github": "https://github.com/apify" },
  "address": { "streetAddress": "Na Příkopě 959/27", "addressLocality": "Prague", "postalCode": "11000", "addressCountry": "CZ" },
  "withheld": { "personalLike": 0, "optOutNotice": 0, "junk": 0, "noMailDomain": 0 },
  "pagesFetched": 2
}
```

### How it works

1. Each input is reduced to its registrable domain (`https://www.acme.com/contact` → `acme.com`). Each domain is
   processed and billed **once per run**; repeated inputs get a free `duplicate` row with the same contacts.
2. The home page is read first, then the most likely contact pages (contact, imprint/legal notice, about, privacy) in
   many languages, with the sitemap or common paths as a fallback. At most `maxPagesPerDomain` pages (default 6).
   The Actor stops early once it has a verified role email on the company's own domain and has read the contact page
   (if the site has one), so most sites need only 2–4 pages.
3. Emails are found in `mailto:` links, visible text, common obfuscations ("info \[at] acme \[dot] com"), Cloudflare
   email protection and structured data. Only addresses whose local part is a role word are kept.
4. Every email domain gets an MX lookup (with an A/AAAA fallback). Domains that cannot receive mail are left out.
5. Social profiles come from structured data and the site's header, footer and navigation.

#### robots.txt and politeness

- robots.txt is checked for every page, including every redirect target. Disallowed pages are never requested; if the
  home page is disallowed the row is `blocked_robots` (free).
- A `Crawl-delay` longer than the default delay is honoured. Requests to one site are one at a time with
  `perHostDelaySecs` between them (default 1 second).
- A 403/429 response or a bot-challenge page ends that site immediately (`blocked`, free). There are no retries,
  no proxies and no browser emulation.
- The User-Agent names this Actor and links to its Store page, so site owners can see who visited.

### Input

- **Websites** (`domains`): domains or URLs, one per line.
- **Dataset** (`datasetId`): e.g. the output of a business-directory or maps scraper. The Actor only **reads** the
  dataset (it is never modified). Set `datasetUrlField` (dot paths allowed, e.g. `company.website`), or leave it empty
  to try `website`, `url`, `domain`, `homepage`. Up to 5 `datasetPassthroughFields` (e.g. `title`, `placeId`) are
  copied into each row's `inputRef`. Items without a website become free `invalid_input` rows.
  `maxDatasetItems` caps how many items are read (default 5,000).
- **What to return** (`contactTypes`): email, phone, social, address.
- **Opt-out notices** (`excludeOptOutFlagged`, default on): addresses next to a "no unsolicited email" style notice
  are left out and only counted. Notices elsewhere on the page are shown on the address (`optOutNotice`).
- **Free-mail role addresses** (`includeFreeMailRoleAddresses`, default on): keeps e.g. `info.acmeplumbing@gmail.com`.
- **Not-found rows** (`includeNotFoundRows`, default on): free rows for every input, so results join 1:1.
- Speed and limits: `maxConcurrentDomains` (default 15), `perHostDelaySecs`, `requestTimeoutSecs`, `maxHtmlKb`.

### Pricing

Pay per event: **$0.002 per domain with a contact** (lower on higher Apify plans), plus Apify's small standard
run-start charge. That is $2 per 1,000 domains where a contact was found; everything else is free.

A domain is charged **once per run** only when at least one returned role email

- is on the company's own domain, or on a free-mail domain such as gmail.com, **and**
- its domain accepts mail (MX record, or A/AAAA fallback).

Free of charge: domains where only an agency or hosting-provider address was found; rows with only social profiles,
phones or an address (`status: found`, `billable: false`); no contact found; blocked, robots-disallowed, unreachable or
invalid inputs; duplicates; and anything not processed because of a limit. (If you remove `email` from `contactTypes`,
a domain is charged when at least one valid phone number was found.)

**Spending limit.** If you set a maximum charge for the run, the Actor reserves the price of one domain before
starting it and never starts a domain it could not pay for, so the limit is not exceeded. When the limit is reached,
the remaining inputs get free `not_processed_limit` rows and are listed in the key-value store record
`UNPROCESSED.json`; the run still succeeds, and `OUTPUT` says how many were left. Contacts of a domain whose charge
was refused are not handed out.

**Fair-use cap.** A run processes at most 500 free domains plus 20 more for each charged domain (a list with at least
about 5% hits is never affected). Inputs beyond the cap become `not_processed_limit` with reason
`free_domain_limit_reached`.

**Migrations.** If Apify moves the run to another server, it resumes where it stopped. A domain that was already
charged is never charged again; in rare cases a row written just before an interruption can appear twice.

### Run summary (`OUTPUT`)

The key-value store record `OUTPUT` contains counts by status, `billable` and `charged` domains, `limitReached`,
`stopReason`, a human-readable `message`, average pages per domain and resource use.

### Limitations

- Role words are matched in many languages, but unusual role prefixes may be missed, and some role addresses of
  sole traders (e.g. `info@janesmith.com`) can still identify a person.
- Sites that build their contact page with JavaScript only, or show contacts only in images or forms, return little.
- Phones without an international prefix are interpreted using the site's country (from the domain or structured
  data); on generic domains such as `.com` they must be written in international format.
- Addresses are taken only from structured data, not from free text.
- Opt-out detection is a heuristic, not a legal assessment.

### Use responsibly

This Actor returns only role-based business contacts (such as info@ or sales@) that companies publish on their own
websites. It must not be used to send spam. You are solely responsible for how you use the results, including
compliance with anti-spam and data-protection laws that apply to you and your recipients, such as CASL (Canada),
CAN-SPAM (USA), GDPR and ePrivacy rules (EU/UK). Some role addresses of sole traders can still identify a person.
A detected "no unsolicited email" notice is shown with its source; respect it. This is not legal advice.

Every contact carries its `source` URL. Keeping it can help you document where you obtained an address (for example
for GDPR Art. 14 information duties or CASL record keeping), but it does not by itself make any use lawful.
Rules for business email marketing differ between countries; check the rules of your recipients' country.

### Benchmark

Local test on 23 October 2026: 100 public business websites (US, UK, DE/AT/CH, FR, other EU, CA, JP, KR, AU/NZ; SaaS,
retail, food, hosting, agencies, fintech), default settings, no proxy.

| Metric | Result |
| --- | --- |
| Domains with at least one contact (`found`) | 78 / 100 |
| Domains with a verified role email (charged under pay-per-event) | 57 / 100 |
| Blocked by the site (HTTP 403/429) or robots.txt | 15 |
| Unreachable (timeout) | 4 |
| Average pages read per domain | 3.6 |
| Time for 100 domains (15 in parallel) | 106 s |
| Peak memory | ~200 MB |

Results depend heavily on the list: small businesses usually publish an info@ address, while large SaaS companies often
use contact forms only. Sites behind bot protection are reported as `blocked` and are not charged.

### FAQ

**Am I charged for domains without an email?** No. Only domains with a verified role email are charged.

**Why is a well-known company `blocked`?** Its site refused automated requests (HTTP 403/429) or its robots.txt
disallows crawling. The Actor does not try to get around this.

**Why did I get no email for a big company?** Many large companies only offer contact forms. The row still lists
phones, social profiles and the address when they are published.

# Changelog

This Actor's version history is a separate document: https://apify.com/hani-tools/company-contact-finder/changelog.md

# Actor input Schema

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

Domains or URLs, one per line (e.g. acme.com or https://www.acme.com/contact). Each registrable domain is processed and billed at most once per run; repeated inputs get a free 'duplicate' row. Social-network, marketplace and link-in-bio URLs are rejected (company websites only).

## `datasetId` (type: `string`):

Read company websites from this dataset (read-only access; the dataset is never modified). Output rows carry an inputRef with the dataset ID and item index so you can join the results back.

## `datasetUrlField` (type: `string`):

Field that holds the website. Dot paths are allowed (e.g. company.website). Leave empty to try website, url, domain, homepage in that order.

## `datasetPassthroughFields` (type: `array`):

Up to 5 dataset fields copied into each row's inputRef for joining (e.g. title, placeId).

## `maxDatasetItems` (type: `integer`):

Read at most this many items from the dataset.

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

Pages read per website, home page included. The Actor picks contact, imprint/legal and about pages first and stops early once it has a verified role email on the company's own domain and has read the contact page (if the site has one).

## `contactTypes` (type: `array`):

What to return. Billing: a domain is billed only when at least one role email on the company's own domain or a free-mail domain (such as gmail.com) was found and its domain accepts mail (MX check). Agency or hosting-provider addresses alone are never billed. If you remove 'email', a domain is billed when at least one valid phone number was found.

## `excludeOptOutFlagged` (type: `boolean`):

When the site says it does not want unsolicited or marketing email next to an address, leave that address out (only the count is reported). Page-wide notices are always shown with their source. Heuristic, not a legal assessment.

## `includeFreeMailRoleAddresses` (type: `boolean`):

Keep addresses such as info.acmeplumbing@gmail.com when the part before @ starts with a role word. They are flagged freeMail: true.

## `includeNotFoundRows` (type: `boolean`):

Also output free rows for domains where nothing was found, that were blocked, unreachable or invalid, so the output joins 1:1 with your input.

## `maxConcurrentDomains` (type: `integer`):

How many websites are processed at the same time. Each website is still read politely, one request at a time.

## `perHostDelaySecs` (type: `number`):

Seconds between two requests to the same website. A larger robots.txt Crawl-delay always wins.

## `requestTimeoutSecs` (type: `integer`):

Give up on a page after this many seconds.

## `maxHtmlKb` (type: `integer`):

Read at most this much HTML per page. Images and PDFs are never downloaded.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "www.postgresql.org"
  ],
  "datasetUrlField": "",
  "datasetPassthroughFields": [],
  "maxDatasetItems": 5000,
  "maxPagesPerDomain": 3,
  "contactTypes": [
    "email",
    "phone",
    "social",
    "address"
  ],
  "excludeOptOutFlagged": true,
  "includeFreeMailRoleAddresses": true,
  "includeNotFoundRows": true,
  "maxConcurrentDomains": 15,
  "perHostDelaySecs": 1,
  "requestTimeoutSecs": 15,
  "maxHtmlKb": 2048
}
```

# Actor output Schema

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

One row per input domain: status, role emails with source and MX check, phones, social profiles, address.

## `summary` (type: `string`):

Counts by status, charged domains, limit information.

# 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",
        "www.postgresql.org"
    ],
    "maxPagesPerDomain": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("hani-tools/company-contact-finder").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",
        "www.postgresql.org",
    ],
    "maxPagesPerDomain": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("hani-tools/company-contact-finder").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",
    "www.postgresql.org"
  ],
  "maxPagesPerDomain": 3
}' |
apify call hani-tools/company-contact-finder --silent --output-dataset

```

## MCP server setup

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

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/wphuRMhCU7goPzXvV/builds/JowNPkv2dQ7IbZYhn/openapi.json
