# Email Validator & Verifier — MX, SMTP & Syntax (`junipr/email-validator`) Actor

Validate email addresses in bulk with syntax, domain, MX, disposable-domain, role-account, and optional SMTP checks for list QA.

- **URL**: https://apify.com/junipr/email-validator.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** Developer tools, Lead generation
- **Stats:** 26 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.90 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Email Validator & Verifier — MX, SMTP & Syntax

### What does Email Validator do?

Email Validator performs layered checks that help assess email syntax and delivery signals. It checks format, verifies MX DNS records, can attempt an optional SMTP mailbox check, consults a maintained disposable-domain source, flags role-based addresses, identifies common free providers, and can test catch-all behavior. SMTP and external-list results can be inconclusive and are reported as `null` rather than guessed.

Each email receives a quality score from 0 to 100 and a human-readable reason explaining the result. The actor also suggests corrections for common domain typos (e.g., `gmial.com` to `gmail.com`). Use it to clean email lists before outreach campaigns, validate sign-up forms, or enrich contact data with deliverability intelligence.

### Features

- **Format validation** — RFC 5322 compliant email format checking
- **MX record verification** — Confirms the domain has valid mail exchange DNS records
- **Optional SMTP mailbox signal** — Attempts RCPT TO and reports `null` when the server or network is inconclusive
- **Disposable domain detection** — Checks a maintained public domain source and reports `null` if that source is unavailable
- **Role-based address detection** — Flags addresses like admin@, info@, support@, noreply@, sales@, webmaster@
- **Free provider detection** — Identifies Gmail, Yahoo, Hotmail, Outlook, and other free email services
- **Catch-all detection** — Optionally checks if the domain accepts all email addresses regardless of the local part
- **Typo suggestions** — Detects common domain misspellings and suggests corrections (gmial.com, yaho.com, outloo.com)
- **Quality scoring** — 0-100 score based on format, MX, SMTP, disposable status, role status, and provider type
- **Bounded batch processing** — Validate up to 10,000 unique emails with an intentionally one-email default
- **Automatic deduplication** — Duplicate emails are removed before processing

### Input Configuration

```json
{
  "emails": ["john@company.com", "test@gmail.com", "fake@temp-mail.io"],
  "maxEmails": 3,
  "checkMx": true,
  "checkSmtp": true,
  "checkDisposable": true,
  "checkRole": true,
  "checkFreeProvider": true,
  "checkCatchAll": false,
  "smtpTimeout": 10000,
  "maxConcurrency": 5
}
```

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `emails` | string\[] | `["test@gmail.com"]` | Email addresses to validate |
| `maxEmails` | integer | `1` | Maximum unique non-empty emails to validate (1-10,000) |
| `checkMx` | boolean | `true` | Verify domain has MX DNS records |
| `checkSmtp` | boolean | `false` | Attempt mailbox verification via SMTP RCPT TO |
| `checkDisposable` | boolean | `true` | Check a maintained disposable email domain source |
| `checkRole` | boolean | `true` | Detect role-based addresses (admin@, info@, etc.) |
| `checkFreeProvider` | boolean | `true` | Detect free email providers (Gmail, Yahoo, etc.) |
| `checkCatchAll` | boolean | `false` | Detect catch-all domains (slower, extra SMTP connection) |
| `smtpTimeout` | integer | `10000` | SMTP connection timeout in milliseconds (3,000-30,000) |
| `maxConcurrency` | integer | `1` | Maximum emails to validate simultaneously (1-20) |

### Output Format

Each validated email produces one result:

```json
{
  "email": "john@company.com",
  "isValid": true,
  "formatValid": true,
  "mxValid": true,
  "smtpValid": true,
  "isDisposable": false,
  "isRole": false,
  "isFreeProvider": false,
  "isCatchAll": null,
  "mxRecords": [
    { "exchange": "mx1.company.com", "priority": 10 },
    { "exchange": "mx2.company.com", "priority": 20 }
  ],
  "suggestion": null,
  "score": 100,
  "reason": "Valid email address",
  "scrapedAt": "2026-03-11T12:00:00.000Z"
}
```

Example of an invalid email:

```json
{
  "email": "user@temp-mail.io",
  "isValid": true,
  "formatValid": true,
  "mxValid": true,
  "smtpValid": null,
  "isDisposable": true,
  "isRole": false,
  "isFreeProvider": false,
  "isCatchAll": null,
  "mxRecords": [{ "exchange": "mx.temp-mail.io", "priority": 10 }],
  "suggestion": null,
  "score": 55,
  "reason": "Valid email with warnings: disposable email domain",
  "scrapedAt": "2026-03-11T12:00:00.000Z"
}
```

### Usage Examples / Use Cases

- **Email list cleaning** — Validate your mailing list before campaigns to remove invalid, disposable, and risky addresses and improve deliverability
- **Sign-up form validation** — Integrate via API to verify email addresses in real time during user registration
- **Lead qualification** — Score incoming leads by email quality, filtering out disposable addresses and prioritizing business domains over free providers
- **CRM data hygiene** — Periodically validate contact emails in your CRM to flag outdated or invalid addresses
- **Fraud prevention** — Block disposable and temporary email addresses from account creation to reduce fake sign-ups
- **Email deliverability auditing** — Check MX records and SMTP responses for your own domain to diagnose sending issues

### Ready-to-run public tasks

- **Check one contact email safely** — format, MX, role, and provider checks without SMTP probing.
- **Check MX and disposable status** — domain-level delivery and disposable-provider evidence.
- **Confirm an invalid domain** — an honest negative result for a nonexistent mail domain.

Every task caps input at one address, disables SMTP, and uses concurrency one.

### Pricing

This actor uses Pay-Per-Event (PPE) pricing: **$3.90 per 1,000 emails validated** ($0.0039 per `email-validated` event). Apify platform usage follows the live Store pricing entry.

### FAQ

#### Why does SMTP verification sometimes return null?

SMTP verification connects to port 25 on the target mail server. Some hosting environments (including Apify's infrastructure) may restrict outbound port 25 connections. When this happens, SMTP verification returns `null` (inconclusive) rather than `false`. The email still receives partial credit in the quality score. MX record verification and all other checks still work normally.

#### What is the quality score based on?

The score (0-100) is calculated from six factors: valid format (30 points), MX records present (30 points), SMTP verification passed (20 points), not a disposable domain (10 points), not role-based (5 points), and business domain vs free provider (5 points). An email with valid format, working MX, confirmed SMTP, from a business domain scores 100.

#### How accurate is disposable email detection?

The actor checks a maintained public disposable-domain source. New providers appear constantly, and the source can be temporarily unavailable; in that case `isDisposable` is `null` rather than an invented `false`.

#### Can I validate thousands of emails in one run?

The actor deduplicates the input and processes up to 10,000 addresses, controlled by `maxEmails`. Increase limits deliberately and keep SMTP/catch-all disabled unless those slower, potentially inconclusive network checks are required.

#### What does the suggestion field do?

If the actor detects a likely typo in the domain part of the email (e.g., `user@gmial.com` instead of `user@gmail.com`), it returns a corrected suggestion in the `suggestion` field. This helps you fix common data entry errors rather than simply marking the email as invalid.

### Related Actors

- [Disposable Email Checker](https://apify.com/junipr/disposable-email-checker) — Focused disposable domain detection if you only need that check
- [Contact Info Scraper](https://apify.com/junipr/contact-info-scraper) — Extract emails from websites, then validate them with this actor
- [Domain WHOIS Lookup](https://apify.com/junipr/domain-whois-lookup) — Get WHOIS registration and DNS data for email domains
- [Yellow Pages Scraper](https://apify.com/junipr/yellow-pages-scraper) — Scrape business listings with contact emails to validate
- [RAG Web Extractor](https://apify.com/junipr/rag-web-extractor) — Extract structured content from websites for AI and data pipelines

# Actor input Schema

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

List of email addresses to validate. One email per line or comma-separated.

## `maxEmails` (type: `integer`):

Maximum number of unique non-empty email addresses to validate.

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

Verify the domain has valid mail exchange (MX) DNS records.

## `checkSmtp` (type: `boolean`):

Connect to the mail server and verify the mailbox exists via SMTP RCPT TO. May not work on all infrastructure (port 25 restrictions).

## `checkDisposable` (type: `boolean`):

Check the email domain against a maintained public disposable-domain source. Returns null when the source is unavailable.

## `checkRole` (type: `boolean`):

Detect role-based email addresses (admin@, info@, support@, noreply@, etc.).

## `checkFreeProvider` (type: `boolean`):

Detect free email providers (Gmail, Yahoo, Hotmail, Outlook, etc.).

## `checkCatchAll` (type: `boolean`):

Detect if the domain accepts all email addresses (catch-all configuration). Slower — requires additional SMTP connection.

## `smtpTimeout` (type: `integer`):

Timeout in milliseconds for SMTP connections.

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

Maximum number of emails to validate simultaneously.

## Actor input object example

```json
{
  "emails": [
    "test@gmail.com"
  ],
  "maxEmails": 1,
  "checkMx": true,
  "checkSmtp": false,
  "checkDisposable": true,
  "checkRole": true,
  "checkFreeProvider": true,
  "checkCatchAll": false,
  "smtpTimeout": 10000,
  "maxConcurrency": 1
}
```

# Actor output Schema

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

Email validation results with quality scores, MX records, SMTP status, disposable/role/free flags, and suggestions.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("junipr/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("junipr/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 '{}' |
apify call junipr/email-validator --silent --output-dataset

```

## MCP server setup

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