# Email Validator: syntax, MX, disposable and typo check (`opstoolkit/email-syntax-mx-validator`) Actor

Check email addresses without contacting any mailbox: syntax, MX record, disposable domains, role addresses such as info@, free providers, typo fixes such as gmial.com to gmail.com, and the mail provider. DNS only, no SMTP probing.

- **URL**: https://apify.com/opstoolkit/email-syntax-mx-validator.md
- **Developed by:** [Elio Saliba](https://apify.com/opstoolkit) (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.40 / 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/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 Validator: syntax, MX, disposable and typo check

Give it a list of email addresses and get one row per address: is the syntax valid, does the domain accept mail, is it a disposable service, is it a role address such as info@, and does it look like a typo of gmail.com, hotmail.com or another big provider. It never contacts a mailbox. It checks only what public DNS and word lists can prove.

Built for people who clean a list before they send to it: sales teams, marketers, shop owners with a signup export, developers who validate a form in bulk.

**$0.40 per 1,000 addresses.** Addresses the DNS lookup could not settle (status `unknown`) and blank lines are free. Apify's free monthly credit covers a first test run at no cost.

### What you get

One row per unique address, in the order you gave them. The few free `unknown` rows come at the end of each block of 500.

| Column | Example | Notes |
|---|---|---|
| `email` | `jane.doe@gmail.com` | Cleaned: trimmed, lower case, domain in ASCII form. `null` when the syntax is broken |
| `status` | `risky` | `valid`, `risky`, `invalid` or `unknown`. See below |
| `reason` | `Mail can reach the domain, but it looks like a typo of gmail.com.` | One plain sentence |
| `issues` | `["possible_typo"]` | Codes you can filter on |
| `syntaxValid` | `true` | |
| `domain` | `gmail.com` | |
| `hasMx` | `true` | `true` when the domain publishes mail servers |
| `mxHosts` | `["gmail-smtp-in.l.google.com"]` | Up to 3 |
| `mailProvider` | `Google` | From the MX records: Google, Microsoft, Zoho, Proton, Fastmail and others |
| `disposable` | `false` | Domain is on a list of 10,000 throwaway-mail services |
| `roleAccount` | `false` | info@, support@, sales@, noreply@ and similar |
| `freeProvider` | `true` | gmail.com, yahoo.com, outlook.com and about 120 other consumer providers |
| `suggestion` | `jane.doe@gmail.com` | Filled when the domain looks like a typo |

**Status values**

| Status | Meaning | Charged |
|---|---|---|
| `valid` | Correct syntax, and the domain accepts email. No flags | yes |
| `risky` | Mail can reach the domain, but something is off: disposable, typo, role address, no MX record, or non-Latin characters before the @. Read `issues` | yes |
| `invalid` | Broken syntax, a domain that does not exist, or a domain that says it takes no email | yes |
| `unknown` | The DNS lookup failed or timed out on both the system and the public resolvers. Run those again | no |

Export as JSON, CSV, Excel or HTML. The run also writes a `SUMMARY` record with counts by status and by issue, and no addresses in it.

### How to use

1. **Paste addresses**, one per line. `Jane Doe <jane@acme.com>` and `mailto:jane@acme.com` are cleaned up. Duplicates are merged.
2. **Or add a link to a file.** A public .txt or .csv, for example one you uploaded to an Apify key-value store. For a CSV with many columns, type the header of the email column.
3. **Press Start** and download the table. Ten thousand addresses usually take under a minute.

### Input example

```json
{
  "emails": [
    "hello@apify.com",
    "jane.doe@gmial.com",
    "test@mailinator.com",
    "not-an-email"
  ],
  "flagRoleAccounts": true,
  "maxConcurrency": 50
}
```

With a file:

```json
{
  "emailFileUrls": ["https://example.com/signups.csv"],
  "csvColumn": "email"
}
```

### Real results

From a real run (shortened):

| Input | Status | Issues | Mail provider |
|---|---|---|---|
| `Jane Doe <jane@github.com>` | valid | | Microsoft |
| `info@python.org` | risky | `role_account` | |
| `jane.doe@gmial.com` | risky | `possible_typo`, `disposable_domain`, `no_mx_record` | |
| `test@mailinator.com` | risky | `disposable_domain` | |
| `not-an-email` | invalid | `missing_at` | |
| `someone@no-such-domain-xyz123.com` | invalid | `domain_not_found` | |
| `x@example.com` | invalid | `null_mx` | |

One full row:

```json
{
  "input": "jane.doe@gmial.com",
  "email": "jane.doe@gmial.com",
  "status": "risky",
  "reason": "Mail can reach the domain, but it is a disposable email service; looks like a typo of gmail.com; no MX record, so mail would go to the website server.",
  "issues": ["disposable_domain", "possible_typo", "no_mx_record"],
  "syntaxValid": true,
  "domain": "gmial.com",
  "hasMx": false,
  "mxHosts": [],
  "mailProvider": null,
  "disposable": true,
  "roleAccount": false,
  "freeProvider": false,
  "suggestion": "jane.doe@gmail.com"
}
```

A test run of 11,700 addresses over 1,600 domains finished in 34 seconds on a laptop with a slow home DNS resolver. On the platform, 2,000 addresses took about one second.

### What it checks

- **Syntax.** One @, a local part up to 64 bytes without spaces, bad characters or stray dots, a real domain name with a valid ending. Internationalized domains are converted to their ASCII form. Quoted local parts and IP-number domains are rejected.
- **Domain mail records.** MX lookup. If there is none, it falls back to the address records, as the mail standard allows, and marks the row risky. A domain that does not exist, publishes a null MX or has no records at all is invalid.
- **Disposable domains.** Over 10,000 throwaway services such as mailinator and yopmail, including their subdomains. The list is the open disposable-email-domains list (CC0).
- **Role addresses.** About 80 names such as info, admin, support, sales, billing, noreply and postmaster.
- **Typos.** gmial.com, hotmial.com, yahooo.com, gmail.con and similar, matched against the big consumer providers. The corrected address is in `suggestion`.
- **Mail provider.** Google, Microsoft, Yahoo, Apple, Zoho, Proton, Fastmail, GoDaddy, IONOS and others, read from the MX hostnames.

### Use cases

- **Before a mailing.** Drop `invalid` and `disposable`, look at `risky`, send to the rest.
- **Signup exports.** Find the typos and send the fixed address back to the user.
- **B2B lists.** Filter out `freeProvider` addresses when you only want company mail, and group by `mailProvider`.
- **Lead scrapers.** Run a scraper's output through it as a cheap first filter, before a paid mailbox check.
- **Form validation in bulk.** Check a CRM export in one run.

### Pricing

Pay per event: **$0.40 per 1,000 addresses** ($0.0004 each). Apify adds a small fee for each run start.

| Addresses | Cost |
|---|---|
| 1,000 | $0.40 |
| 10,000 | $4 |
| 100,000 | $40 |

You pay for `valid`, `risky` and `invalid` rows. `unknown` rows and blank lines are free. Duplicates are merged before checking and charged once. Set a max cost per run in the Apify run options to cap spending. When the run reaches it, it stops, and `SUMMARY.notReturnedMaxCostReached` tells you how many addresses were left out.

**Compared with other options.** The most used email verifiers on the Store charge about $0.0008 to $0.001 per address, and some charge $0.0025 or more. This Actor costs less than half of that and runs on 256 MB. The difference in what you get: a full verifier also asks the receiving mail server whether the mailbox exists. This one cannot, so it is a first filter and not a replacement when you need to know that one specific mailbox is live.

### How it treats addresses and servers

- It sends no email and opens no connection to any mail server. It never asks whether a mailbox exists.
- The only network traffic is DNS: the domain part of each address is looked up once. Your system resolver is tried first, and if it fails the lookup is repeated on Cloudflare, Google and Quad9 public resolvers.
- Addresses are written only to your run's dataset. The summary record and the logs contain counts and no addresses.
- A file link must be public and is read once. Links to private network addresses are refused.

### Limits

- **It cannot tell whether a mailbox exists.** `valid` means the syntax is correct and the domain accepts mail. `jane@acme.com` can still bounce if Jane does not work there.
- **Catch-all servers** accept everything, so they look valid here.
- **Typo hints are guesses.** They cover the large consumer providers. A company domain with a typo is not caught.
- **Role addresses are marked risky by default** because they reach a team or nobody. Turn that off with `flagRoleAccounts` when you do want them.
- **Up to 300,000 addresses per run.** Split larger lists.
- Disposable services appear faster than any list. New ones get through until the list is updated.

### Integrations

Everything Apify supports works here: schedules, webhooks, the REST API, and the official integrations with Zapier, Make, n8n and Google Sheets. The **API** tab on this page has ready code for JavaScript, Python and cURL.

### FAQ

**Is this a real email verifier?**
It verifies the domain, not the mailbox. For the mailbox you need a verifier that talks to the mail server. Many people run this first, because it removes the broken, throwaway and mistyped addresses for a fraction of the price.

**Why is info@ risky?**
It usually reaches a shared inbox or nobody. Turn off `flagRoleAccounts` and it stays `valid`. The `roleAccount` column is filled either way.

**Why did I get `unknown`?**
The DNS lookup timed out or the name server failed. It is free. Run those addresses again.

**Does it keep my list?**
Only in your own dataset, which you control and can delete.

**Something broke.**
Open an issue on the Issues tab with the run link. I reply within a day.

# Changelog

This Actor's version history is a separate document: https://apify.com/opstoolkit/email-syntax-mx-validator/changelog.md

# Actor input Schema

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

One address per line. Names in the form Jane Doe <jane@acme.com> and mailto: links are cleaned up. Duplicates are merged and counted once.

## `emailFileUrls` (type: `array`):

Optional. Public links to .txt or .csv files that hold addresses, for example a file you uploaded to an Apify key-value store. Up to 40 MB per file. Without a column name below, every cell that contains an @ is read.

## `csvColumn` (type: `string`):

Optional. When your CSV has many columns, give the header of the column that holds the address, for example email. The first row must be the header.

## `flagRoleAccounts` (type: `boolean`):

Addresses such as info@, support@, sales@ and noreply@ reach a team or nobody, not a person. When on, they get status risky and the issue role_account. When off, they stay valid. The roleAccount column is filled either way.

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

How many domains to look up at the same time. Each domain is looked up once, however many addresses use it.

## Actor input object example

```json
{
  "emails": [
    "hello@apify.com",
    "jane.doe@gmial.com",
    "info@python.org",
    "test@mailinator.com",
    "not-an-email",
    "someone@no-such-domain-xyz123.com"
  ],
  "flagRoleAccounts": true,
  "maxConcurrency": 50
}
```

# Actor output Schema

## `results` (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": [
        "hello@apify.com",
        "jane.doe@gmial.com",
        "info@python.org",
        "test@mailinator.com",
        "not-an-email",
        "someone@no-such-domain-xyz123.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("opstoolkit/email-syntax-mx-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": [
        "hello@apify.com",
        "jane.doe@gmial.com",
        "info@python.org",
        "test@mailinator.com",
        "not-an-email",
        "someone@no-such-domain-xyz123.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("opstoolkit/email-syntax-mx-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": [
    "hello@apify.com",
    "jane.doe@gmial.com",
    "info@python.org",
    "test@mailinator.com",
    "not-an-email",
    "someone@no-such-domain-xyz123.com"
  ]
}' |
apify call opstoolkit/email-syntax-mx-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,opstoolkit/email-syntax-mx-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/t5VgpqjamfIzgQKtc/builds/W4mSq1iA5WJ5vZ62N/openapi.json
