# Website Email Extractor – Emails from Any Website, Bulk (`gazidev/website-email-extractor`) Actor

Extract the email addresses a business publishes on its own website: homepage, contact, about and imprint pages. Bulk domains, MX check, role vs personal flags, source page for each email. Respects robots.txt. No Google, no LinkedIn. Domains without emails are free. $2 per 1,000 domains with emails.

- **URL**: https://apify.com/gazidev/website-email-extractor.md
- **Developed by:** [Cemal Atakli](https://apify.com/gazidev) (community)
- **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 domain with emails

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 Email Extractor – Emails from Any Website, Bulk

Give it a list of company domains. For each one it reads the pages the business itself publishes (homepage, `/contact`, `/contact-us`, `/about`, `/impressum`, `/imprint` and up to 4 contact/about links from the homepage) and returns **one row per domain** with every email address it found, the page it was found on, whether it is a role, personal or free-mail address, and whether the email's domain has working mail servers (MX).

- **Own website only.** No Google, no LinkedIn, no third-party directories, no guessing of addresses.
- **Respects robots.txt** for every URL, with its own honest User-Agent (`website-email-extractor/0.1`). No proxies, no browser disguise, no bot-protection bypass.
- **You pay only for domains where emails were found.** Blocked, failed and empty domains are free.

### Who it is for

Agencies and sales teams that already have a list of websites (from a CRM export, a directory, Google Maps results…) and want the contact email each business publishes.

### Input

| Field | Default | Meaning |
|---|---|---|
| `domains` | 3 examples | Domains or URLs. Only the host is used; `www.` and subpages of the same domain are merged into one row. |
| `pages` | `/`, `/contact`, `/contact-us`, `/about`, `/impressum`, `/imprint` | Paths tried on every site (404s are skipped). |
| `followContactLinks` | `true` | Also open up to 4 same-host links from the homepage that look like contact/about/team/imprint/legal pages. |
| `checkMx` | `true` | DNS lookup of MX (or A/AAAA fallback) for each email domain. No SMTP connection is made. |
| `excludeFreeMail` | `false` | Drop Gmail/Yahoo/Outlook/GMX/... addresses. |
| `maxConcurrency` | `10` | Websites processed in parallel (each site gets at most 2 parallel requests). |
| `maxItems` | `0` (all) | Process only the first N domains. |

### Output (one row per domain)

```json
{
  "domain": "dentalcarelondon.co.uk",
  "emails": [
    {"email": "smile@dentalcarelondon.co.uk", "sourceUrl": "https://www.dentalcarelondon.co.uk/",
     "type": "role", "onSiteDomain": true, "mxValid": true}
  ],
  "emailCount": 1,
  "pagesFetched": 2,
  "pagesSkippedByRobots": 0,
  "fetchedUrls": ["https://www.dentalcarelondon.co.uk/", "https://www.dentalcarelondon.co.uk/contact-us"],
  "robotsTxt": "ok",
  "blockedBy": null,
  "error": null,
  "checkedAt": "2026-11-07T12:29:56+00:00"
}
```

- `type`: `role` (info@, sales@, hello@, office@…), `personal` (a named mailbox such as `neil@firm.com`), `freemail` (consumer provider such as Gmail; often a sole trader's private mailbox).
- `onSiteDomain`: the email belongs to the scanned domain. Off-site addresses (a Gmail address, a parent company, sometimes the web agency) are kept but ranked last.
- `mxValid`: `true` the domain can receive mail, `false` it cannot (no MX/A record or a null MX), `null` DNS did not answer or MX check is off. This is a domain check, not proof that the mailbox exists.
- `blockedBy`: `robots` (robots.txt disallows every page we would fetch, or robots.txt itself answers 401/403), `http403` (the site answers 401/403 or a bot-challenge page), `dns` (the domain does not resolve), otherwise `null`. Other failures (timeouts, TLS errors) are in `error`.

The Output tab also has a **run summary** (`OUTPUT` key-value record) with counts of paid, empty, blocked and failed domains.

### What it finds and what it does not

It finds addresses written in the HTML of those pages: `mailto:` links, plain text, common obfuscations (`name [at] domain [dot] com`, `name (at) domain.com`), Cloudflare email protection, HTML entities and schema.org JSON-LD `email` fields. It filters image names (`logo@2x.png`), tracking/monitoring addresses, placeholder addresses (`you@domain.com`, form placeholders) and similar junk.

Limits, honestly:

- **Many small sites publish no email at all** (only a contact form or phone). In our probe of small-business domains only about 3 in 8 reachable sites showed an address. Those domains are free.
- No JavaScript rendering: addresses injected by JavaScript after the page loads, or shown only as images, are not found.
- Sites that block automated clients (HTTP 403, Cloudflare/other challenges) are not retried and not bypassed; they come back as `blockedBy: "http403"` and are free.
- At most 10 pages per domain (6 paths + 4 links). Emails deep inside a blog or a staff directory may be missed.

### Pricing

Pay per event: **$0.002 per domain with at least one email** ($2 per 1,000), plus the standard $0.00005 actor start. Domains without emails, blocked domains (robots/403/DNS), failed domains, and domains whose only emails have `mxValid: false` are not charged. Set a maximum cost per run in the run options; the Actor stops cleanly when it is reached and never saves a row it could not charge.

### Legal use and personal data (GDPR)

This Actor only reads pages that a business published publicly on its own site and that its robots.txt allows. Even so, **an email address of a named person (`personal`) or a private mailbox (`freemail`) is personal data** under GDPR, UK GDPR and similar laws, and many countries restrict unsolicited marketing email (e.g. ePrivacy/PECR, CAN-SPAM, CASL).

**You are responsible for making sure your use of the results is lawful**: have a legal basis (e.g. legitimate interest with a balancing test), inform the people you contact, honour opt-outs and deletion requests, and follow the email-marketing rules of the recipient's country. Use `excludeFreeMail: true`, or filter on `type: "role"`, if you want to keep to shared business mailboxes. This Actor does not give legal advice.

### Related Actors

- [Website Contact Finder](https://apify.com/gazidev/website-contact-finder) – emails plus phone numbers and social profiles per website.
- [Email Syntax & MX Validator](https://apify.com/gazidev/email-syntax-mx-validator) – bulk syntax, MX, disposable and role checks for email lists you already have.

# Actor input Schema

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

Company websites, e.g. `acme.com` or `https://www.acme.de/en/`. Only the host is used (`https://` is added). Each domain is processed once and returns one row. You can also paste many domains separated by spaces, commas or new lines into one entry.

## `pages` (type: `array`):

Paths fetched on each domain (relative to the homepage). Missing pages (404) are skipped silently. Maximum 20.

## `followContactLinks` (type: `boolean`):

Also open up to 4 extra pages that the homepage links to and that look like contact, about, team, imprint or legal pages (same host only).

## `checkMx` (type: `boolean`):

Look up the mail servers (MX, or A/AAAA fallback) of each email's domain. `mxValid: false` means the domain cannot receive mail. No SMTP connection is made.

## `excludeFreeMail` (type: `boolean`):

Drop addresses at consumer mail providers. These often belong to an individual (e.g. a sole trader), which matters for GDPR and similar laws.

## `maxConcurrency` (type: `integer`):

How many websites are processed at the same time. Each site gets at most 2 parallel requests (1 if its robots.txt sets a crawl-delay).

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

Stop after this many domains from the list (0 = all). Use the run's maximum cost setting to cap spend.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "smithlawfirm.com",
    "dentalcarelondon.co.uk"
  ],
  "pages": [
    "/",
    "/contact",
    "/contact-us",
    "/about",
    "/impressum",
    "/imprint"
  ],
  "followContactLinks": true,
  "checkMx": true,
  "excludeFreeMail": false,
  "maxConcurrency": 10,
  "maxItems": 0
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (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",
        "smithlawfirm.com",
        "dentalcarelondon.co.uk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gazidev/website-email-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",
        "smithlawfirm.com",
        "dentalcarelondon.co.uk",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gazidev/website-email-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",
    "smithlawfirm.com",
    "dentalcarelondon.co.uk"
  ]
}' |
apify call gazidev/website-email-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gazidev/website-email-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/9yMgBl2lAYIPDYci9/builds/asuuH2CPIOnNsRjtz/openapi.json
