# Website Contact Extractor - GDPR-Safe Role Emails & Phones (`bhole_krishna/website-contact-extractor`) Actor

Website Contact Extractor finds the contact details companies publish on their own sites and classifies every address. Role contacts (info@, sales@, support@) are returned; addresses naming a person are withheld as personal data under GDPR and DPDP. Phones, socials, MX-verified. No API key.

- **URL**: https://apify.com/bhole_krishna/website-contact-extractor.md
- **Developed by:** [Krishna Dubey](https://apify.com/bhole_krishna) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 website 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?

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

## Website Contact Extractor - Business Emails, Phones & Socials

Give it a list of domains. Get back the contact details each company publishes on its own website — **with every email address classified as a business contact or a person's address, before it reaches you.**

No API key, no login, no proxy.

### What this does differently

Almost every contact scraper on the Store returns a flat list of addresses and leaves you to sort it out. That sounds like a small inconvenience. It isn't, because the list mixes two legally different things:

| | Example | What it is |
| --- | --- | --- |
| **Role address** | `info@acme.com`, `sales@acme.com` | A business contact the company published to be written to |
| **Personal address** | `john.smith@acme.com`, `priya@acme.com` | Identifies a living person — personal data under the **GDPR** and India's **DPDP Act** |

Send a cold email to the first and you are contacting a business. Send one to the second and you are processing someone's personal data, which needs a lawful basis you probably have not established.

So this Actor decides for you. **`businessContactsOnly` is on by default**: role addresses come through, personal ones are withheld — and the count of what was withheld is reported, so nothing disappears silently. If you do have a lawful basis, turn it off and get everything.

Two things separate this from the alternatives, and I checked rather than assumed.

**Withholding is the default, not an option.** The closest competitor, [Email Extractor (Role & Named)](https://apify.com/transparent_meteorite/website-contact-extractor), also tags addresses role-versus-named — it predates this Actor and deserves the credit — but its `includeNamedEmails` defaults to **true**, so you receive personal addresses unless you remember to turn them off. Here the safe setting is the one you get without thinking about it.

**You can ask for one department.** `roleCategories` narrows to `sales`, `support`, `press`, `legal`, `careers`, `billing`, `technical` or `general`. Of the sixteen most-used contact and email scrapers I checked, none filters the *mailbox* by department. Several filter a *person* by job function from a people database, which is a different product and a different thing to buy.

### What you get

One row per website:

| Field | Meaning |
| --- | --- |
| `domain`, `websiteUrl`, `finalUrl` | The site, and where it actually resolved |
| `companyName` | From `og:site_name` or the page title |
| `primaryEmail` | The single best contact — the site's **own** domain first, role addresses before personal, `noreply@` never, and never an address belonging to another company |
| `offDomainEmailCount` | How many addresses on the pages belong to somebody else |
| `emailCount`, `roleEmailCount` | How much was found |
| `personalEmailsWithheld` | How many were held back, so you know they existed |
| `emails[]` | Every released address, classified (below) |
| `phones[]` | From `tel:` links and international-format numbers |
| `socials` | LinkedIn, X, Facebook, Instagram, YouTube, GitHub |
| `pagesCrawled`, `robotsBlockedPages` | What was read, and what robots.txt refused |

Each entry in `emails[]` carries:

| Field | Values |
| --- | --- |
| `addressType` | `role`, `personal`, or `unknown` |
| `roleCategory` | `sales`, `support`, `general`, `careers`, `press`, `legal`, `billing`, `technical`, `noreply` |
| `confidence` | `mailto` · `structured-data` · `contact-page` · `page-text` — strongest first |
| `sourceUrl` | The exact page it came from, so you can check it |
| `syntaxValid` | Whether the address is well-formed |
| `mxValid` | Whether the domain accepts mail at all |

`roleCategory` is the part people underrate — and it is an input as well as an output. Pass `roleCategories: ["sales"]` and you get the sales route for every company and nothing else. "Send this to sales, not to careers" is a filter you run, not a column you sort afterwards.

#### On the MX check

`mxValid` is a DNS lookup asking whether the domain has mail servers. **It sends nothing and never touches a mailbox**, so the recipient cannot detect it. It tells you a domain can receive mail. It does not tell you a specific inbox exists — no honest tool can, without probing it.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `websites` | array | Domains or URLs. `apify.com` and `https://apify.com/` both work |
| `businessContactsOnly` | boolean | Withhold addresses naming a person. **Default on** |
| `roleCategories` | array | Keep only certain departments — `sales`, `support`, `press`, `legal`… Empty means all |
| `maxPagesPerSite` | integer | Homepage plus contact/about/imprint pages. Default 6 |
| `extractPhones` | boolean | Default on |
| `extractSocials` | boolean | Default on |
| `verifyMx` | boolean | Check the domain accepts mail. Default on |
| `respectRobotsTxt` | boolean | **Default on.** Leave it on unless you own the sites |
| `maxItems` | integer | One row per website |

#### Example input

```json
{
    "websites": ["plausible.io", "fastmail.com", "render.com"],
    "businessContactsOnly": true,
    "maxPagesPerSite": 5
}
```

#### Example output

```json
{
    "domain": "fastmail.com",
    "companyName": "Fastmail",
    "primaryEmail": "partnerships@fastmailteam.com",
    "emailCount": 5,
    "roleEmailCount": 5,
    "personalEmailsWithheld": 0,
    "emails": [
        {
            "address": "support@fastmail.com",
            "addressType": "role",
            "roleCategory": "support",
            "confidence": "mailto",
            "sourceUrl": "https://www.fastmail.com/contact/",
            "syntaxValid": true,
            "mxValid": true
        }
    ],
    "phones": ["+1 (800) 315-5939"],
    "socials": { "linkedin": "https://linkedin.com/company/fastmail" },
    "pagesCrawled": 5
}
```

### How well does it actually work

On a test of 12 real company sites it found contact details on **8 of them — a 67% hit rate.** That number is here rather than hidden because you should know it before you spend anything.

The four misses were not failures of the crawler. They were companies that **publish no email address at all**, using a contact form instead. No scraper can extract an address that was never published, and any tool claiming a near-100% hit rate is either guessing addresses from name patterns or scraping them from somewhere other than the company's own site.

Large SaaS companies hide behind forms far more often than small businesses do. If you are building lead lists from SMBs, agencies or local companies, expect better than 67%. If you are scraping the Fortune 500, expect worse.

### Uses

- **Lawful B2B outreach** — a list of business addresses you can defend, with personal ones already removed
- **CRM enrichment** — you have the domains, you need the contact route
- **Department routing** — `roleCategory` tells you whether an address reaches sales, support or press
- **Vendor and partner research** — contact details plus social profiles in one pass
- **Data hygiene** — `mxValid` drops domains that cannot receive mail before you waste a send

### How it behaves

- `robots.txt` is fetched once per host and respected by default; blocked pages are counted in `robotsBlockedPages`
- The homepage is read, then up to five pages whose link or text suggests contact, about, imprint, legal or support
- Scripts and styles are stripped before reading text, so inline JSON cannot leak fragments like `u003esales@stripe.com` into your results
- Form placeholders (`yourcompany.com`, `john@example.com`) are dropped
- Phone numbers are only taken from `tel:` links or international format. A looser pattern cannot tell a phone number from a date or an IP address, and the first draft of this returned both

### Notes and limits

- **JavaScript-rendered contact pages are missed.** This runs without a browser, which is what makes it fast and cheap. Most sites put contact details in server-rendered HTML or the footer; some do not.
- **Obfuscated addresses are missed** — `name [at] domain [dot] com` is not decoded.
- **An address on the page is not always the site's address.** Apify's own documentation quotes `info@baeckerei-mustermann.de` as an example, and a run of this Actor returned it among apify.com's contacts — real, deliverable, role-shaped, and a German bakery's. Every address is now labelled `own`, `freemail` or `other`. An `other` address is sorted last and passed over for `primaryEmail` **whenever the site publishes one of its own** — but it is used when it is all there is, because off-domain is not the same as wrong: real suppliers publish `enquiry@bangalorerefinery.com` on `brpl.asia` and `baerlocher@baerlocher.com.br` on `baerlocher.com`, both the same company on another domain. A free mailbox counts as the site's own, because for a great many businesses it is the right address.
- **Classification is a heuristic, not an oracle.** A bare word that is not a known department is treated as a first name, so `jason@` is withheld as personal. That errs towards withholding, which is the safer error. `unknown` means exactly that: decide for yourself.
- `mxValid` says a domain accepts mail, not that a particular mailbox exists.

### FAQ

**Does it find personal emails if I ask?**
Turn off `businessContactsOnly` and every address found is returned, still classified. Do that only where you have a lawful basis for processing personal data — that is your responsibility, not the Actor's.

**Does it guess addresses like firstname.lastname@company.com?**
No. It reports only what a company actually published on its own website. Guessed addresses are invented personal data with a verification step bolted on, and this does not do that.

**Do I need a proxy?**
Almost never. Company contact pages are published to be read.

**Why is the hit rate not higher?**
Because a third of companies publish no address at all. See the section above — the honest number is 67%.

# Actor input Schema

## `websites` (type: `array`):

Domains or URLs, one per line. Either form works: apify.com or https://apify.com/.

## `businessContactsOnly` (type: `boolean`):

On: return role addresses (info@, sales@, support@) and withhold addresses that identify a named person, which are personal data under the GDPR and India's DPDP Act. The count of withheld addresses is still reported. Turn off only if you have a lawful basis for processing personal contact data.

## `roleCategories` (type: `array`):

Keep only addresses reaching the departments you pick. Leave empty for all of them.

## `maxPagesPerSite` (type: `integer`):

How many pages to open per website. The homepage plus its contact, about and imprint pages. Raising this rarely finds new addresses.

## `extractPhones` (type: `boolean`):

Collect phone numbers from tel: links and page text.

## `extractSocials` (type: `boolean`):

LinkedIn, X, Facebook, Instagram, YouTube and GitHub links found on the site.

## `verifyMx` (type: `boolean`):

Looks up the domain's MX records. This asks DNS whether mail is accepted at all; it sends nothing and never touches a mailbox.

## `respectRobotsTxt` (type: `boolean`):

Skip pages a site's robots.txt disallows. Leave this on unless you own the sites being crawled.

## `maxItems` (type: `integer`):

One row per website.

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

Usually unnecessary. Company contact pages are published to be read and rarely block anyone.

## Actor input object example

```json
{
  "websites": [
    "apify.com",
    "crawlee.dev",
    "vercel.com"
  ],
  "businessContactsOnly": true,
  "roleCategories": [],
  "maxPagesPerSite": 6,
  "extractPhones": true,
  "extractSocials": true,
  "verifyMx": true,
  "respectRobotsTxt": true,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One row per website, with every released address classified.

## `csv` (type: `string`):

The same rows as a spreadsheet.

# 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 = {
    "websites": [
        "apify.com",
        "crawlee.dev",
        "vercel.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bhole_krishna/website-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 = { "websites": [
        "apify.com",
        "crawlee.dev",
        "vercel.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bhole_krishna/website-contact-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 '{
  "websites": [
    "apify.com",
    "crawlee.dev",
    "vercel.com"
  ]
}' |
apify call bhole_krishna/website-contact-extractor --silent --output-dataset

```

## MCP server setup

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