# Email Verifier & Validator: MX, Disposable & Role Check (`kleb-data/email-verifier`) Actor

Checks a list of email addresses for syntax, MX records (mail servers), disposable domains, role-based addresses, free providers and common domain typos. DNS only: it does not connect to mail servers or probe mailboxes.

- **URL**: https://apify.com/kleb-data/email-verifier.md
- **Developed by:** [Kleb Data](https://apify.com/kleb-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 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

## Email Verifier & Validator: MX, Disposable & Role Check

Checks a list of email addresses and tells you which ones are worth sending to. For every address it checks the syntax, looks up the domain's mail-server (MX) records, and flags disposable domains, role-based addresses, free mailbox providers and common domain typos.

It does **not** open SMTP connections or probe mailboxes. It checks syntax, the domain and its mail-server records, not whether the specific mailbox exists. `valid` therefore means "well-formed address on a domain that accepts mail", not "this inbox exists".

### What you can do with it

- Clean a lead list before an email campaign: drop `invalid`, review `risky`
- Verify the emails found by a website contact scraper: pass that run's dataset as `datasetId`
- Catch typos such as `gmial.com` at signup or import time (`didYouMean`)
- Separate personal addresses from shared inboxes (`roleBased`) and company domains from free providers (`freeProvider`)

### Input

| Field | Meaning |
|---|---|
| `emails` | Email addresses to check |
| `datasetId` | Optional. Dataset of another Actor run whose items contain emails; checked together with `emails` |
| `emailField` | Field in those dataset items that holds the email (default `emails`). It may be a string or an array of strings |
| `concurrency` | Emails checked in parallel (default 10, max 50) |

Duplicates are checked once (comparison ignores letter case).

### Output (one item per distinct email)

```json
{
  "email": "test@mailinator.com",
  "normalized": "test@mailinator.com",
  "status": "risky",
  "reason": "disposable",
  "syntaxValid": true,
  "domain": "mailinator.com",
  "hasMx": true,
  "mxHosts": ["mail.mailinator.com", "mail2.mailinator.com"],
  "acceptsMail": true,
  "disposable": true,
  "roleBased": true,
  "freeProvider": false,
  "didYouMean": null
}
```

| `status` | When | `reason` |
|---|---|---|
| `invalid` | Bad syntax, or the domain accepts no mail | `invalid_syntax`, `domain_not_found`, `null_mx`, `no_mx_or_address_record` |
| `risky` | Disposable domain or role-based address; also when the DNS lookup itself failed | `disposable`, `role_based`, `dns_lookup_failed` |
| `valid` | Everything else | `ok`, `ok_address_record_fallback` |

### Notes

- `mxHosts` is sorted by MX priority. `acceptsMail` is true when the domain has MX records, or, without any MX record, an A/AAAA record (the standard fallback). A "null MX" record (`0 .`) means the domain declares that it accepts no mail.
- DNS lookups go through the public DNS-over-HTTPS JSON APIs of Google (`dns.google`) and, as a fallback, Cloudflare. Answers are cached per domain within a run.
- For an address with invalid syntax nothing is looked up: `normalized`, `domain`, `hasMx` and `acceptsMail` are `null`. They are also `null` for `hasMx` and `acceptsMail` when the DNS lookup failed.
- The syntax check covers the usual `name@domain.tld` form. Quoted local parts, IP-address domains and non-ASCII local parts are reported as invalid. Internationalized domains are accepted and shown in punycode.
- `normalized` is the lowercased address. Provider-specific rules (Gmail dots, `+tags`) are not applied.
- `disposable`, `roleBased`, `freeProvider` and `didYouMean` come from lists built into the Actor (about 590 disposable domains, about 110 role names such as `info`, `sales`, `support`, `admin`). The lists are not exhaustive, so `disposable: false` does not prove a domain is permanent. A role name is matched on the whole part before `@`.
- `didYouMean` covers a fixed set of misspellings of large providers (Gmail, Yahoo, Hotmail, Outlook, iCloud and a few others); it is `null` otherwise.
- Catch-all domains, full mailboxes and deactivated accounts cannot be detected without contacting the mail server, which this Actor does not do.

### Pricing

Pay per event: $0.50 per 1,000 emails, platform usage included.

# Actor input Schema

## `emails` (type: `array`):

Email addresses to check, one per line.

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

Optional. A dataset from another Actor run (for example a website contact scraper) whose items contain emails. They are checked together with the list above.

## `emailField` (type: `string`):

Name of the item field that holds the email. The field may be a string or an array of strings.

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

How many emails are checked in parallel. DNS answers are cached per domain.

## Actor input object example

```json
{
  "emails": [
    "hello@apify.com",
    "test@mailinator.com",
    "not-an-email"
  ],
  "emailField": "emails",
  "concurrency": 10
}
```

# Actor output Schema

## `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 = {
    "emails": [
        "hello@apify.com",
        "test@mailinator.com",
        "not-an-email"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kleb-data/email-verifier").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 = { "emails": [
        "hello@apify.com",
        "test@mailinator.com",
        "not-an-email",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kleb-data/email-verifier").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 '{
  "emails": [
    "hello@apify.com",
    "test@mailinator.com",
    "not-an-email"
  ]
}' |
apify call kleb-data/email-verifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kleb-data/email-verifier"
        }
    }
}
```

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/MoxXkigraJwZg6CcZ/builds/OZy6C0CER6acco5B9/openapi.json
