# Email Validator for Syntax, MX & Disposable Emails (`miacx/email-validator`) Actor

Check email syntax, MX records, disposable domains and common typos in batches. Get address-level verdicts without SMTP probing or mailbox verification.

- **URL**: https://apify.com/miacx/email-validator.md
- **Developed by:** [mia.cx](https://apify.com/miacx) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 email checks

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 for Syntax, MX & Disposable Emails

Check an address list for syntax errors, missing MX records, disposable domains and common domain typos.
DNS comes from Cloudflare; role, free-provider and typo signals come from curated lists.
No SMTP probing or mailbox verification runs. A plausible address can still point to a nonexistent mailbox.
Each completed unique check costs $0.00035, plus $0.00005 per run start at default memory.

### Try it

```json
{"emails":["Jane.Doe@Gmail.com"]}
```

An empty input `{}` checks Jane.Doe@gmail.com, info@example.com and someone@gamil.com.
An empty `emails` list fails the run. No upstream API key is needed.

### Use from an agent

Add `https://mcp.apify.com?tools=miacx/email-validator` to your MCP client and sign in to Apify.
Call the dedicated Actor tool with the input above, then read its completed dataset with `get-dataset-items`.
Or set `APIFY_TOKEN` to your Apify API token and request JSON rows:

```sh
curl --fail-with-body 'https://api.apify.com/v2/actors/miacx~email-validator/run-sync-get-dataset-items' \
  -H "Authorization: Bearer $APIFY_TOKEN" -H 'Content-Type: application/json' \
  -d '{"emails":["Jane.Doe@Gmail.com"]}'
```

### What you get

Read `status` first. On `ok`, use `verdict` and `reason`; a successful check can return an invalid verdict.
There is one row per input, in input order, including duplicates.
All domain lookups finish before dataset rows are saved.

This row comes from the recorded Gmail DNS fixture, processed with a fixed clock.

```json
{
  "input": "Jane.Doe@Gmail.com",
  "status": "ok",
  "ok": true,
  "error": null,
  "message": null,
  "syntaxValid": true,
  "email": "Jane.Doe@gmail.com",
  "local": "Jane.Doe",
  "domain": "gmail.com",
  "verdict": "plausible",
  "reason": null,
  "hasMx": true,
  "mxHosts": [
    "gmail-smtp-in.l.google.com",
    "alt1.gmail-smtp-in.l.google.com",
    "alt2.gmail-smtp-in.l.google.com",
    "alt3.gmail-smtp-in.l.google.com",
    "alt4.gmail-smtp-in.l.google.com"
  ],
  "disposable": false,
  "role": false,
  "free": true,
  "suggestion": null,
  "source": "cloudflare-doh",
  "fetchedAt": "2026-10-31T00:00:00.000Z"
}
```

`email` preserves local-part case and lowercases/IDNA-encodes the domain. `input` preserves the original string.
`syntaxValid` is true for parsed syntax even if DNS fails, false for malformed syntax, or null for unsupported syntax.
`mxHosts` lists hosts by increasing MX preference, without deduplication. Empty arrays need interpretation alongside `hasMx` and `status`.
`hasMx` is null when the lookup failed; false can mean no MX, null MX or NXDOMAIN.

`disposable` matches the bundled domain list, including parent domains. `role` ignores local-part case and plus tags.
`free` identifies listed free-mail providers. These lists are not exhaustive.
`suggestion` offers a recognized one-edit domain correction; it never changes the input.
`source` is cloudflare-doh for answered Actor lookups; `fetchedAt` records when that response was parsed.
Both are null when there is no usable DNS answer. Syntax failures have null address fields and flags.

Verdicts use the first matching reason in this order:
`invalid_syntax`, `unsupported_syntax`, `no_domain`, `null_mx`, `disposable`, `dns_error`, `no_mx`, `typo`, `role`.
No matching reason yields `plausible`. Check `status` first because a disposable signal can coexist with a DNS failure.

### Input

| Field | Default | Accepted input |
| --- | --- | --- |
| `emails` | `["Jane.Doe@gmail.com","info@example.com","someone@gamil.com"]` | 1–10,000 address strings. An empty list, null or a non-string item fails the run. |

Whitespace around addresses is trimmed. Supported addresses have an ASCII dot-atom local part and a hostname domain.
The local part allows 64 characters; the normalized address allows 254.
Unicode domains are IDNA-encoded. Quoted local parts, address literals and non-ASCII local parts return `unsupported_syntax`.

### Pricing

An Email check (`email-checked`) costs $0.00035 for a saved, successful check on a unique normalized address.
`plausible`, `risky` and DNS-backed `invalid` verdicts count, including null MX and NXDOMAIN.
Syntax failures, unsupported forms, DNS failures and spending-limit rows incur no Email check events.
Duplicates incur no additional events within one run. Local-part case remains significant, so a@gmail.com and A@gmail.com count separately.

1,000 completed unique checks cost $0.35005, including the $0.00005 run start at default 256 MB memory.
The start charge applies even with no billable checks. Apify counts one start event per GB, with a minimum of one.
Verdicts beyond the spending limit become free `spending_limit` rows with null signals and `verdict: "unknown"`.
Duplicates of an already paid verdict remain available.

### Limits and data freshness

- At most 10,000 addresses per run. Each distinct normalized domain shares one MX lookup, including failures.
- DNS runs with six concurrent lookups, a three-second timeout per attempt and a 64 KiB response cap.
- Transient transport failures allow up to three attempts. Resolver answers such as SERVFAIL are final for that lookup.
- No SMTP or A/AAAA fallback runs. A domain without MX gets a risky verdict because implicit-MX delivery is unchecked.
- The disposable list is bundled from [disposable-email-domains](https://github.com/disposable-email-domains/disposable-email-domains), refreshed on 2026-10-31.

The Actor has no cross-run DNS cache. It shares answers within the run, so addresses on the same domain share a timestamp.
Results are saved in chunks of 100 rows.
The default dataset contains input addresses and results under Apify's storage retention.

The synchronous API waits up to 300 seconds. Use [asynchronous runs](https://docs.apify.com/api/v2/actor-runs-post) for longer batches.

### If a row fails

| Status | Next step |
| --- | --- |
| `invalid_syntax` | Correct the address using `message`. |
| `unsupported_syntax` | Use a checker that supports that address form. It is not declared invalid. |
| `dns_error` | Read `message`; retry transient resolver failures later. |
| `spending_limit` | Raise the run budget or submit fewer unique addresses. |

# Actor input Schema

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

1-10,000 email address strings. Omitted runs Jane.Doe@gmail.com, info@example.com and someone@gamil.com; \[] or null fails the run. Each input produces one row. Domains are lowercased and IDNA-encoded; local-part case is preserved. Each unique normalized address with a saved successful check incurs one event per run, including risky or invalid verdicts. No SMTP or mailbox verification runs.

## Actor input object example

```json
{
  "emails": [
    "Jane.Doe@gmail.com",
    "info@example.com",
    "someone@gamil.com"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

One row per item, each with a status field.

# 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": [
        "Jane.Doe@gmail.com",
        "info@example.com",
        "someone@gamil.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("miacx/email-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": [
        "Jane.Doe@gmail.com",
        "info@example.com",
        "someone@gamil.com",
    ] }

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

```

## MCP server setup

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