# Email Validator — Syntax, MX & Risk Checks (`muhammadafzal/email-address-validator`) Actor

Validate email addresses with syntax, domain, MX, disposable-email, role-account, and risk checks for cleaner lead lists and outreach data.

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

## Pricing

from $0.20 / 1,000 email validateds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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 — Syntax, MX & Risk Checks

Validate email addresses in bulk with a deterministic Apify Actor built for lead cleaning, CRM hygiene, signup screening, and AI-agent workflows. It checks mailbox syntax, IDNA-normalized domains, DNS records, MX records, disposable domains, role accounts, and common free email providers, then returns one structured dataset row per email.

Use this actor when you need a fast, transparent email validation pass before enrichment, outreach, CRM import, or marketing automation. Do not use it as proof that a specific mailbox inbox exists; the actor does not perform SMTP handshakes, send messages, bypass catch-all domains, or verify human ownership of an address.

### Output

| Field | Description |
| --- | --- |
| `email` | Original input email address. |
| `normalizedEmail` | Trimmed email with IDNA ASCII domain normalization. |
| `status` | `valid`, `risky`, or `invalid`. |
| `confidence` | Score from `0` to `1` for easy filtering. |
| `syntaxValid` | Whether the address matches a safe RFC-style mailbox pattern. |
| `domainAscii` | DNS-safe domain used for lookups. |
| `hasMx` | Whether MX records exist when MX checks are enabled. |
| `isDisposable` | Whether the domain is in the built-in temporary mailbox list. |
| `isRoleAccount` | Whether the mailbox is generic, such as `sales@` or `support@`. |
| `isFreeProvider` | Whether the domain is a common consumer email provider. |
| `reasons` | Human-readable explanation for the result. |

### Pricing

Pay per event is enabled:

- Actor start: `$0.00005` per run
- Email validated: `$0.0002` per email processed

A typical 1,000-email run costs about `$0.20` plus the small actor start event and standard Apify platform usage.

### Input

You can provide email addresses in two ways:

- `emails`: a list with one email per item
- `emailText`: pasted text; the actor extracts email-looking strings

Duplicate addresses are removed case-insensitively before validation. `maxEmails` caps how many unique addresses are processed in one run.

### Validation Logic

The actor marks hard failures as `invalid`, including malformed syntax, DNS failures when DNS checks are enabled, MX failures when MX checks are enabled, and disposable domains when `allowDisposable` is false. It marks usable but lower-quality addresses as `risky`, including free providers and role accounts when role accounts are not allowed. Clean addresses that pass enabled checks are marked `valid`.

DNS behavior is controlled by `checkDns` and `checkMx`. Keep both enabled for production cleaning. Turn them off only for fast local syntax-only testing or when your network environment blocks DNS lookups.

### Example Input

```json
{
  "emails": [
    "alex@example.com",
    "sales@example.org",
    "bad@@example"
  ],
  "checkDns": true,
  "checkMx": true,
  "allowDisposable": false,
  "allowRoleAccounts": true,
  "maxEmails": 1000
}
```

### Example Output Item

```json
{
  "email": "alex@example.com",
  "normalizedEmail": "alex@example.com",
  "isValid": true,
  "status": "valid",
  "confidence": 0.95,
  "syntaxValid": true,
  "domain": "example.com",
  "domainAscii": "example.com",
  "localPart": "alex",
  "dnsChecked": true,
  "domainHasDns": true,
  "mxChecked": true,
  "mxRecords": ["mail.example.com"],
  "hasMx": true,
  "isDisposable": false,
  "isRoleAccount": false,
  "isFreeProvider": false,
  "reasons": ["Email passed all enabled validation checks."],
  "checkedAt": "2026-07-08T05:00:00.000Z"
}
```

### API Usage

```bash
apify call USERNAME/email-address-validator --input='{
  "emails": ["alex@example.com", "bad@@example"],
  "checkDns": true,
  "checkMx": true
}'
```

### Python Client

```python
from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("USERNAME/email-address-validator").call(run_input={
    "emails": ["alex@example.com", "bad@@example"],
    "checkDns": True,
    "checkMx": True,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### Limitations

This actor does not send email, log in to mail providers, or guarantee a human reads the mailbox. Some domains accept all mail through catch-all routing, and DNS success does not prove an individual inbox exists. Disposable-domain detection uses a curated built-in list, not a paid real-time global feed.

### Legal

Use email validation responsibly and comply with applicable privacy, anti-spam, and marketing laws, including CAN-SPAM, GDPR, and local consent requirements. The actor is a data-quality utility, not permission to contact people.

### What is Email Validator?

**Email Validator** turns the target data into structured, reusable results on Apify. Use it when you need repeatable collection for analysts, developers, agencies, researchers, and AI-agent workflows without maintaining a custom scraper or one-off integration. Run it manually, schedule recurring jobs, call it through the Apify API, or connect it to an AI agent through the Apify MCP server.

The Actor stores results in an Apify dataset, where they can be previewed and exported as JSON, CSV, Excel, XML, or RSS. Availability and completeness depend on the source, supplied inputs, public visibility, authentication requirements, and upstream rate limits.

### Use cases for Email Validator

- Build structured datasets for research, reporting, enrichment, or monitoring.
- Automate repetitive collection with schedules, webhooks, and API calls.
- Feed clean records into spreadsheets, databases, CRMs, BI tools, AI agents, or RAG pipelines.
- Track changes over time by running the same validated input on a schedule.
- Replace fragile manual copy-and-paste work with a reproducible Apify workflow.

### How to use Email Validator

1. Open the Actor input page and choose a focused, valid target.
2. Set a conservative result limit for the first run.
3. Start the Actor and inspect the dataset for coverage and field availability.
4. Export the results or connect the dataset to your downstream system.
5. Scale gradually and use scheduling, pagination, or proxies when supported.

#### Important input options

- `emails` — List of email addresses to validate. Use one mailbox per item, for example alex@example.com. Defaults to the sample address when no task input is edited. NOT a list of names, websites, or le
- `emailText` — Optional pasted text scanned for email addresses. Accepts raw text such as 'Contact alex@example.com and sales@example.org'. Defaults to empty text. NOT used for names or phone extraction.
- `checkDns` — Verifies the domain has DNS records. Uses A, AAAA, or MX lookups, for example example.com. Defaults to true for stronger validation. NOT an SMTP inbox-delivery test.
- `checkMx` — Verifies that the email domain accepts mail through MX records. Uses DNS MX lookup, for example gmail.com. Defaults to true and may mark domains without MX as invalid. NOT a mailbox ping or
- `allowDisposable` — Controls whether known temporary mailbox domains can pass. Example disposable domains include mailinator.com and yopmail.com. Defaults to false for lead-quality workflows. NOT a full real-ti
- `allowRoleAccounts` — Controls whether generic addresses such as info@, sales@, or support@ can pass without a risk flag. Defaults to true because many business contacts use shared inboxes. NOT a person-name veri
- `outputInvalidOnly` — Writes only invalid records to the dataset while still counting all checked emails in OUTPUT. Use this when cleaning a large list and only needing rejects. Defaults to false so every email g
- `maxEmails` — Maximum number of unique email addresses processed in one run. Accepts 1 to 10000, for example 500. Defaults to 1000 to keep runs predictable. NOT the number of rows guaranteed in output whe

### API and automation example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/email-address-validator').call({
  // Add the same input fields you use in the Apify Console.
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Related Apify Actors

Use these dedicated tools when a neighboring data source or workflow is a better match:

- [Leads Finder Pro - B2B Leads with Emails \[Apollo Alternative\]](https://apify.com/muhammadafzal/leads-finder-pro)
- [Yellow Pages US Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-us-scraper)
- [Yellow Pages Australia Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-au-scraper)
- [GitHub Repo Search — Stars, Language & Topics](https://apify.com/muhammadafzal/github-repo-search-stars-language-topics)
- [Gelbe Seiten Scraper — German Yellow Pages Leads with Emails](https://apify.com/muhammadafzal/gelbe-seiten-scraper)
- [Texas State Licensed Contractor Scraper — TDLR License Data](https://apify.com/muhammadafzal/tdlr-texas-scraper)
- [California CSLB Contractor License Scraper](https://apify.com/muhammadafzal/cslb-california-scraper)
- [Contractor Lead Scraper — Verified Emails (HVAC, Plumbing)](https://apify.com/muhammadafzal/contractor-lead-scraper)
- [Instagram Followers & Following Scraper — With Cookies](https://apify.com/muhammadafzal/instagram-following-scraper)
- [Facebook Ads Library Scraper — Meta Ad Intelligence Tool](https://apify.com/muhammadafzal/facebook-ads-library-scraper)

### Frequently asked questions

#### How many results can I scrape with Email Validator?

The practical total depends on the source, input limits, pagination, available records, run timeout, and upstream restrictions. Start with a small run, verify the output, and increase the limit gradually.

#### Can I integrate Email Validator with other apps?

Yes. Use Apify integrations, webhooks, schedules, dataset exports, Make, Zapier, Google Sheets, cloud storage, or your own application.

#### Can I use Email Validator with the Apify API?

Yes. Start runs with the Apify REST API or an official Apify client, then retrieve records from the run's default dataset. Keep your API token in a secret or environment variable.

#### Can I use Email Validator through an MCP Server?

Yes. The Apify MCP server can expose the Actor to compatible AI clients and agents. Review the input and expected cost before allowing an autonomous workflow to run it at scale.

#### Do I need proxies?

It depends on the source and volume. Use the default configuration first. For larger or geographically sensitive jobs, select an appropriate proxy configuration only when the Actor supports it.

#### Is it legal to scrape this data?

Scraping rules vary by source, jurisdiction, data type, and intended use. Collect only data you are authorized to access, respect applicable terms and privacy laws, and avoid restricted or personal data misuse. This documentation is not legal advice.

#### Your feedback

If a field is missing, a source layout has changed, or you need a supported use case documented, open an issue on the Actor page with a reproducible input and run ID.

# Actor input Schema

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

List of email addresses to validate. Use one mailbox per item, for example alex@example.com. Defaults to the sample address when no task input is edited. NOT a list of names, websites, or lead objects.

## `emailText` (type: `string`):

Optional pasted text scanned for email addresses. Accepts raw text such as 'Contact alex@example.com and sales@example.org'. Defaults to empty text. NOT used for names or phone extraction.

## `checkDns` (type: `boolean`):

Verifies the domain has DNS records. Uses A, AAAA, or MX lookups, for example example.com. Defaults to true for stronger validation. NOT an SMTP inbox-delivery test.

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

Verifies that the email domain accepts mail through MX records. Uses DNS MX lookup, for example gmail.com. Defaults to true and may mark domains without MX as invalid. NOT a mailbox ping or SMTP login.

## `allowDisposable` (type: `boolean`):

Controls whether known temporary mailbox domains can pass. Example disposable domains include mailinator.com and yopmail.com. Defaults to false for lead-quality workflows. NOT a full real-time disposable-domain subscription.

## `allowRoleAccounts` (type: `boolean`):

Controls whether generic addresses such as info@, sales@, or support@ can pass without a risk flag. Defaults to true because many business contacts use shared inboxes. NOT a person-name verification check.

## `outputInvalidOnly` (type: `boolean`):

Writes only invalid records to the dataset while still counting all checked emails in OUTPUT. Use this when cleaning a large list and only needing rejects. Defaults to false so every email gets a row. NOT a filter that skips validation or billing.

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

Maximum number of unique email addresses processed in one run. Accepts 1 to 10000, for example 500. Defaults to 1000 to keep runs predictable. NOT the number of rows guaranteed in output when invalid-only mode is enabled.

## Actor input object example

```json
{
  "emails": [
    "john@apify.com",
    "sales@example.org",
    "bad@@example"
  ],
  "emailText": "",
  "checkDns": true,
  "checkMx": true,
  "allowDisposable": false,
  "allowRoleAccounts": true,
  "outputInvalidOnly": false,
  "maxEmails": 1000
}
```

# Actor output Schema

## `summary` (type: `string`):

Link to the OUTPUT key containing total, valid, risky, invalid, DNS settings, and estimated PPE cost.

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

Link to dataset items. Each item is one validated email address with status, confidence, DNS, MX, and risk fields.

# 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": [
        "john@apify.com",
        "sales@example.org",
        "bad@@example"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/email-address-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": [
        "john@apify.com",
        "sales@example.org",
        "bad@@example",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/email-address-validator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "john@apify.com",
    "sales@example.org",
    "bad@@example"
  ]
}' |
apify call muhammadafzal/email-address-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammadafzal/email-address-validator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/JsiicNqtlrYTLjwYy/builds/uYzeefyMn5zWN6Hxy/openapi.json
