# Email List Validator (Syntax, MX, Disposable, Role, Typos) (`isnard/email-list-validator`) Actor

Pre-clean an email list before paying for SMTP verification: syntax, MX, disposable domains, role accounts and typo fixes. $0.30 per 1,000.

- **URL**: https://apify.com/isnard/email-list-validator.md
- **Developed by:** [Matias Isnard](https://apify.com/isnard) (community)
- **Categories:** Lead generation, Marketing
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 email checkeds

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 List Validator (Syntax, MX, Disposable, Role, Typos)

Pre-clean an email list before paying for SMTP verification: syntax, MX, disposable domains, role accounts and typo fixes. $0.30 per 1,000.

Give it your own email list, as a list in the input or as a link to a CSV or TXT file. For each unique address you get the normalized form, whether the syntax is valid, whether the domain can receive mail (MX records), and flags for disposable domains, role accounts (admin@, info@, sales@...) and free providers (Gmail, Outlook...). Common typos like `gmial.com` or `hotmail.con` get a suggested correction. Each address ends with a `status` and the `reasons` behind it.

It does not connect to any mail server. It cannot tell you that a mailbox exists, and it never claims to.

### Who it is for

- Anyone about to send a newsletter or a campaign who wants to remove addresses that will bounce for sure.
- Teams cleaning a CRM export or sign-up form data before importing it somewhere else.
- Developers who want to catch typos like `@gmial.com` in sign-ups and suggest the fix.

### Why there is no SMTP check

Some validators open a connection to the recipient's mail server and start sending a message (RCPT TO) to see if the mailbox is accepted. This Actor does not, on purpose:

- Mail servers and blocklists treat this as address harvesting. The IP doing it gets blacklisted, which hurts everyone who shares it.
- The answers are often wrong. Gmail, Outlook, Yahoo and most company servers accept every address at that stage ("catch-all") or reject unknown senders, so the result says little about the mailbox.
- Outgoing port 25 is blocked on most cloud platforms, so the check would mostly time out.

What you get instead is everything that can be checked reliably from public DNS and the address itself.

### What it checks

| Check | How |
| --- | --- |
| Normalization | Trims spaces, removes `mailto:` and `<>`, lowercases, converts international domains to punycode (`bücher.de` to `xn--bcher-kva.de`). Duplicates are counted once. |
| Syntax | Practical RFC 5321/5322 rules: one `@`, local part up to 64 characters with the usual allowed characters and no leading, trailing or double dots, valid domain labels, a real-looking TLD, 254 characters total. Quoted local parts (`"john doe"@example.com`) and IP literals are rejected: they are legal but practically never used by real people. |
| Mail DNS | MX records of the domain on the public resolvers 1.1.1.1 and 8.8.8.8. Without MX, an A or AAAA record counts as the mail server, as RFC 5321 says, but the address is marked risky because almost every real mail domain publishes MX. A null MX (`0 .`, RFC 7505) means the domain accepts no mail. Each domain is looked up once per run. |
| Disposable | The domain, or a parent domain, is on the [disposable-email-domains](https://github.com/disposable-email-domains/disposable-email-domains) list (about 10,000 domains, CC0 1.0 public domain). |
| Role account | The local part (before any `+tag`) is a shared mailbox name such as admin, info, sales, support, contact, noreply, billing, hr, webmaster or postmaster. |
| Free provider | The domain is a public mailbox provider such as gmail.com, outlook.com, hotmail.com, yahoo.com, icloud.com, proton.me, gmx.de or mail.ru. This is only a flag, it does not change the status. |
| Typo suggestion | The domain is one edit away (a missing, extra, wrong or swapped letter) from a popular mailbox domain, after fixing an ending that is not a real TLD (`.con`, `.cmo`, `.comm`, `.nett`, `.ogr`...). Examples: `gmial.com`, `gmai.com`, `hotmial.com`, `yaho.com`, `outlok.com`, `gmail.co`, `company.con` (suggests `company.com`). |

### Status

| Status | Meaning | Reasons that lead to it |
| --- | --- | --- |
| `invalid` | Will bounce. Remove it. | `syntax:<what is wrong>`, `domain_not_found`, `no_mail_server`, `null_mx` |
| `unknown` | DNS did not answer (timeout or server failure). Try again later. Not charged. | `dns_error` |
| `risky` | Syntax and domain are fine, but there is a reason to be careful. | `disposable_domain`, `role_account`, `possible_typo`, `no_mx_a_record_fallback` |
| `valid_syntax_and_domain` | Syntax is valid and the domain receives mail. The mailbox itself was not checked. | none |

The first matching row wins, in the order of the table. A typo domain that does not exist (`gmail.con`) is `invalid` and still gets the suggestion. A typo domain that exists (some are registered by typo squatters) is `risky`.

### Input

```json
{
    "emails": ["someone@gmail.com", "info@example.com", "user@gmial.com", "test@mailinator.com"],
    "sourceUrl": "https://example.com/my-list.csv"
}
```

- `emails`: a list of addresses.
- `sourceUrl` (optional): a public link to a CSV or TXT file, up to 50 MB. Every value that contains `@` is read, from any column, so a CRM export works as is. Both inputs can be combined.

### Output

One dataset item per unique address:

```json
{
    "input": "synthetic.typo003@gamil.com",
    "email": "synthetic.typo003@gamil.com",
    "domain": "gamil.com",
    "syntaxValid": true,
    "isRole": false,
    "isFreeProvider": false,
    "isDisposable": false,
    "suggestedDomain": "gmail.com",
    "reasons": ["possible_typo"],
    "suggestion": "synthetic.typo003@gmail.com",
    "hasMx": true,
    "mxHosts": ["mail.gamil.com"],
    "status": "risky",
    "occurrences": 1
}
```

`occurrences` is how many times the address appeared in the input. For an address with invalid syntax only `email`, `domain` (null), `syntaxValid`, `reasons` and `status` are filled.

### Privacy

The list is read from your input, checked in memory and written only to the dataset of your run. Nothing is stored anywhere else, nothing is sent to third parties (only the domain names are looked up in public DNS), and addresses are not written to the log. The dataset follows your Apify data retention settings and you can delete it at any time.

### Speed

A test run with 2,000 synthetic addresses on 72 domains took under 4 seconds with 256 MB of memory. Lists usually repeat a few domains many times, and each domain is looked up only once.

### Pricing

Pay per event: `email-checked`, once per unique address in the dataset. Duplicates and empty lines are not charged, and neither are `unknown` results. The price is shown on the Actor page. You can cap the cost of a run with the "Maximum cost per run" setting; the Actor stops cleanly when it is reached.

### Limitations

- It cannot tell if the mailbox exists or is full. A `valid_syntax_and_domain` address can still bounce.
- Catch-all domains are not detected, since that needs SMTP.
- The disposable list is maintained by volunteers. New throwaway domains appear every day, and a few typo-squatting domains (for example `gmial.com`) are on the list too, so they show as both disposable and typo.
- Typo suggestions only cover popular mailbox domains and fake TLDs. A typo in a company domain (`acme.com` vs `acne.com`) is not caught.
- Role account detection works on the name only. `info@` at a one-person business may well be read by a person.

### Refreshing the disposable list

The list is bundled in `my_actor/data/disposable_domains.txt` and updated with each new build of the Actor:

```bash
curl -L -o my_actor/data/disposable_domains.txt \
  https://raw.githubusercontent.com/disposable-email-domains/disposable-email-domains/main/disposable_email_blocklist.conf
python -m unittest discover -s tests -t .
apify push
```

### Run locally

```bash
python -m venv .venv
.venv/Scripts/pip install -r requirements.txt   # on Linux/macOS: .venv/bin/pip
## put input in storage/key_value_stores/default/INPUT.json
.venv/Scripts/python -m my_actor
python -m unittest discover -s tests -t .
```

Author: Matias Isnard.

### FAQ

**Does it check that the mailbox exists?**
No. There is no SMTP check, so a `valid_syntax_and_domain` address can still bounce. The README explains why.

**What is charged?**
Each unique address. Duplicates, empty lines and `unknown` results are free.

**Does it detect catch-all domains?**
No, that needs SMTP.

**Are typos in company domains caught?**
No. Typo suggestions cover popular mailbox domains like gmail.com and fake TLDs.

### Related tools

- [Domain Security & Email Deliverability Checker](https://apify.com/isnard/domain-security-checker): check SPF, DKIM and DMARC of your sending domain.
- [Website Technology Detector](https://apify.com/isnard/website-tech-detector): see the email provider and tools of company domains.

# Actor input Schema

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

Email addresses, one per line. Duplicates are checked once (after trimming and lowercasing).

## `sourceUrl` (type: `string`):

Optional. A public URL to a CSV or TXT file with your list (up to 50 MB). Every value that contains @ is read, in any column. Combined with the Emails list above.

## Actor input object example

```json
{
  "emails": [
    "someone@gmail.com",
    "info@example.com",
    "user@gmial.com",
    "test@mailinator.com"
  ]
}
```

# 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": [
        "someone@gmail.com",
        "info@example.com",
        "user@gmial.com",
        "test@mailinator.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("isnard/email-list-validator").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": [
        "someone@gmail.com",
        "info@example.com",
        "user@gmial.com",
        "test@mailinator.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("isnard/email-list-validator").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": [
    "someone@gmail.com",
    "info@example.com",
    "user@gmial.com",
    "test@mailinator.com"
  ]
}' |
apify call isnard/email-list-validator --silent --output-dataset

```

## MCP server setup

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

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/DyMFtcQ3RmxvpLaQu/builds/Ca1j6MaIoDiPuVPWX/openapi.json
