# Bulk Email Validator - MX, Disposable & Typo Check (`beryline_pastel/bulk-email-validator-mx-disposable`) Actor

Clean email lists fast and cheap: RFC syntax, DNS/MX and null-MX records, 55k+ disposable domains, role accounts, free providers and typo suggestions (did you mean gmail.com?). No SMTP probing, no API keys. $0.0005 per email.

- **URL**: https://apify.com/beryline_pastel/bulk-email-validator-mx-disposable.md
- **Developed by:** [Beryline Pastel](https://apify.com/beryline_pastel) (community)
- **Categories:** Lead generation, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 email validateds

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/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

## Bulk Email Validator - Syntax, MX, Disposable & Typo Check (no SMTP)

Fast, cheap **first-pass cleaning** for email lists. For every address you get a `valid` / `risky` / `invalid` verdict with machine-readable reasons: syntax, domain and MX/DNS status, disposable-domain detection, role accounts (info@, support@...), free-provider flag and "did you mean gmail.com?" typo suggestions.

**$0.0005 per email ($0.50 per 1,000).** No API keys, no proxies, no SMTP.

### What it does NOT do (read this first)

This Actor **does not connect to mail servers and does not probe mailboxes (no SMTP `RCPT TO` / catch-all detection).** Reasons: outbound SMTP ports (25) are blocked on most cloud platforms, and mass probing damages the sending reputation of the IP doing it. That means:

- It **cannot confirm that a specific mailbox exists.** `valid` means "well-formed address on a domain that can receive mail", not "this person's inbox is real".
- It cannot detect catch-all domains, full mailboxes or mailbox-level bounces.

**Best use:** run this first to cheaply remove the obvious junk (broken syntax, dead domains, null-MX domains, throwaway addresses, typos, role accounts), then send only the survivors to a paid SMTP-level verifier if you need mailbox-level certainty. That keeps the expensive step small.

### Checks

| Check | Result fields |
|---|---|
| Syntax (practical RFC 5322 subset; local part <= 64, total <= 254; no quoted locals / IP literals) | `syntaxValid`, `localPart`, `domain` |
| Internationalized domains (IDN, via punycode) | handled; `domain` keeps the Unicode form |
| Domain exists (NXDOMAIN) | `domainExists` |
| MX records (sorted by priority, max 5) | `hasMx`, `mxRecords` |
| Null MX (RFC 7505, "0 .") = domain explicitly accepts no mail | `isNullMx` (-> invalid) |
| No MX but A/AAAA record (RFC 5321 implicit-MX fallback) | `hasARecordFallback` (-> risky) |
| Disposable / throwaway domains (55k+ list, subdomains matched) | `isDisposable` |
| Role accounts (info, admin, support, sales, noreply...) | `isRoleAccount` |
| Free mailbox providers (Gmail, Outlook, Yahoo, iCloud, Proton, GMX, Yandex, mail.ru, QQ, 163...) | `isFreeProvider` |
| Typos in domain or TLD (gmial.com, gmail.con, hotmail.cmo...) | `didYouMean` |

#### Status logic

- **invalid**: bad syntax, OR domain does not exist (NXDOMAIN), OR null MX, OR no MX and no A/AAAA record.
- **risky**: disposable, OR role account, OR no MX but A-record fallback, OR typo suggestion, OR non-ASCII local part.
- **valid**: none of the above.
- **error**: DNS lookup failed on both resolvers (timeout/SERVFAIL). Not charged; re-run those rows.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `emails` | string\[] | - | Addresses to validate. Empty items are skipped (not charged). |
| `checkMx` | boolean | `true` | DNS checks per unique domain. Off = offline syntax/disposable/role/typo pass. |
| `dnsResolver` | `cloudflare-doh` / `system` | `cloudflare-doh` | Cloudflare public DNS-over-HTTPS JSON API, falling back to the system resolver; or system only. |
| `dedupe` | boolean | `true` | Drop repeated addresses (case-insensitive). Dropped duplicates produce no row and are not charged. |
| `concurrency` | integer | `20` | Parallel domain lookups (1-100). Each domain is resolved once per run and cached. |

### Output example

```json
{
  "input": "john@gmial.com",
  "email": "john@gmial.com",
  "status": "risky",
  "reasons": ["a_record_fallback", "disposable", "possible_typo"],
  "syntaxValid": true,
  "localPart": "john",
  "domain": "gmial.com",
  "isDisposable": true,
  "isRoleAccount": false,
  "isFreeProvider": false,
  "didYouMean": "john@gmail.com",
  "hasMx": false,
  "mxRecords": [],
  "hasARecordFallback": true,
  "isNullMx": false,
  "domainExists": true
}
```

A run summary (counts per status and per reason, unique domains looked up, runtime) is stored in the key-value store under `SUMMARY`.

### Pricing

Pay per event: **$0.0005 per email validated** (event `email-validated`).

- You are charged **per non-empty input row that is processed**, whatever the verdict. Validation is the service: an `invalid` result is a delivered answer and is billed like a `valid` one.
- Not charged: empty items, removed duplicates (when `dedupe` is on), and `error` rows (DNS infrastructure failures).
- Set a maximum cost per run; the Actor stops cleanly when the limit is reached and keeps the rows already produced.

For scale: 100,000 addresses = $50. Mailbox-level (SMTP) verification services typically cost several times more per address because they do real mailbox probing; this Actor is intentionally the cheap first filter, not a replacement for that step. Compare with your own verifier's current price list.

### Performance

A test run of 10,000 addresses over ~50 domains finished in about 6 seconds on a laptop (DNS is looked up once per unique domain). Lists with very many distinct domains are slower, bounded by DNS round-trips and the `concurrency` setting.

### FAQ

**Does `valid` mean the mailbox exists?** No. See "What it does NOT do".

**Why is a Gmail address "valid" but `info@company.com` "risky"?** Role accounts are shared inboxes; they are often poor targets for cold outreach and have higher complaint rates, so they are flagged rather than rejected.

**Why is an address with a typo "risky" and not "invalid"?** The typo domain may be real. `didYouMean` gives you the likely intended address to review or auto-correct.

**Where does the disposable list come from?** The MIT-licensed `mailchecker` package (community-maintained list of 55k+ throwaway domains). No list is ever complete; new disposable services appear daily.

**Which DNS is used?** Cloudflare's public DNS-over-HTTPS JSON API (`cloudflare-dns.com`) by default, with automatic fallback to the container's resolver. Only the domain part of an address is sent in DNS queries - never the local part.

### Limits

- No SMTP verification, no catch-all or greylisting detection.
- Quoted local parts (`"john doe"@x.com`) and IP-literal domains (`user@[1.2.3.4]`) are reported as invalid; they are practically never used for real mailboxes.
- Role and free-provider lists are curated lists, not exhaustive.
- Typo suggestions are heuristics (edit distance against popular providers) and can occasionally flag a legitimate lookalike domain; they are risky, not invalid.

### Use with AI agents (MCP)

This Actor works as a tool for Claude, ChatGPT, Cursor and other MCP clients through the Apify MCP server:

```
https://mcp.apify.com?tools=beryline_pastel/bulk-email-validator-mx-disposable
```

Example prompt: *"Clean this email list: flag invalid syntax, domains without MX, disposable and role addresses."*

### Related tools by the same author

- [Bulk Core Web Vitals Auditor](https://apify.com/beryline_pastel/bulk-core-web-vitals-auditor)
- [Bulk Domain Checker (expiry, WHOIS, DNS, SSL)](https://apify.com/beryline_pastel/bulk-domain-checker)
- [Bulk Phone Number Validator (E.164)](https://apify.com/beryline_pastel/bulk-phone-number-validator)
- [Broken Link & Redirect Checker](https://apify.com/beryline_pastel/broken-link-redirect-checker)
- [Bulk PDF Text Extractor](https://apify.com/beryline_pastel/bulk-pdf-text-extractor)

# Actor input Schema

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

Email addresses to validate, one per item. Empty items are skipped and not charged.

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

Look up MX (and A/AAAA fallback) records for each unique domain. Turn off for a fast syntax/disposable/role/typo-only pass without any network calls.

## `dnsResolver` (type: `string`):

cloudflare-doh queries Cloudflare's public DNS-over-HTTPS JSON API and falls back to the system resolver if unreachable. system uses the container's DNS only.

## `dedupe` (type: `boolean`):

Skip repeated addresses (case-insensitive, after trimming). Skipped duplicates produce no output row and are not charged.

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

Number of domains resolved in parallel (1-100). Each unique domain is looked up once per run.

## Actor input object example

```json
{
  "emails": [
    "test@gmail.com",
    "john@gmial.com",
    "a@mailinator.com",
    "info@apify.com",
    "not-an-email",
    "user@example.com",
    "someone@this-domain-does-not-exist-84213.com"
  ],
  "checkMx": true,
  "dnsResolver": "cloudflare-doh",
  "dedupe": true,
  "concurrency": 20
}
```

# Actor output Schema

## `emails` (type: `string`):

No description

## `summary` (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": [
        "test@gmail.com",
        "john@gmial.com",
        "a@mailinator.com",
        "info@apify.com",
        "not-an-email",
        "user@example.com",
        "someone@this-domain-does-not-exist-84213.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("beryline_pastel/bulk-email-validator-mx-disposable").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": [
        "test@gmail.com",
        "john@gmial.com",
        "a@mailinator.com",
        "info@apify.com",
        "not-an-email",
        "user@example.com",
        "someone@this-domain-does-not-exist-84213.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("beryline_pastel/bulk-email-validator-mx-disposable").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": [
    "test@gmail.com",
    "john@gmial.com",
    "a@mailinator.com",
    "info@apify.com",
    "not-an-email",
    "user@example.com",
    "someone@this-domain-does-not-exist-84213.com"
  ]
}' |
apify call beryline_pastel/bulk-email-validator-mx-disposable --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,beryline_pastel/bulk-email-validator-mx-disposable"
        }
    }
}
```

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/eROJj8coQAugnQIb4/builds/vlW0507zQwfgh4Q5H/openapi.json
