# Bulk Email Validator & List Cleaner | MX, Disposable, $0.30/1k (`bifras/email-list-cleaner`) Actor

Bulk email validation for $0.30 per 1,000: syntax, domain and MX checks, disposable and role-based detection, typo suggestions, mail provider, SPF and DMARC. A cheap pre-check before paid verification: no fake 'valid' without a mailbox check.

- **URL**: https://apify.com/bifras/email-list-cleaner.md
- **Developed by:** [Francesco Michael Billeci](https://apify.com/bifras) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.30 / 1,000 emails

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 Cleaner & Validator (Syntax, MX, Disposable)

Clean an email list in seconds, for a fraction of the price of full SMTP verifiers.
Paste addresses, point to a dataset from another Actor, or give a CSV/TXT link. You get one row per unique address:

- **Syntax check**: practical RFC rules, IDN domains, `mailto:` and `<...>` wrappers cleaned.
- **Domain and mail server check**: does the domain exist, does it have MX records, or does it explicitly refuse mail (null MX, RFC 7505)?
- **Disposable detection**: about 10,000 throwaway domains (Mailinator, 10minutemail and similar), subdomains included.
- **Role accounts**: `info@`, `sales@`, `support@`, `admin@` and about 90 more, including common Italian ones.
- **Typo suggestions**: `gmial.com` → `gmail.com`, `hotmail.con` → `hotmail.com`.
- **Mail provider**: Google Workspace, Microsoft 365, Zoho, Proton, Mimecast, Proofpoint and 20+ more, detected from MX records. Useful to segment B2B lists.
- **Free vs business**: Gmail, Outlook, Yahoo and 80+ consumer providers flagged.
- **Domain security**: SPF and DMARC records returned as-is.

### Honest results

This Actor **does not connect to the recipient's mailbox (SMTP)**, so it never claims an address "exists".
The best verdict is `good_domain`: the address is well-formed and its domain accepts mail. Every row has `"mailboxChecked": false`.
In return it is fast (about 500 addresses per second), cheap, and never puts your IPs or sender reputation at risk.

| Verdict | Meaning | What to do |
|---|---|---|
| `bad` | Broken syntax, domain doesn't exist, domain accepts no mail, or disposable domain | Remove |
| `risky` | Role account, likely typo (see `didYouMean`), or no MX record (A-record fallback) | Review or fix |
| `good_domain` | Well-formed address on a domain that accepts mail | Keep |
| `unknown` | DNS lookup failed (server error or timeout) | Retry later. **Not charged.** |

### Input

| Field | Description |
|---|---|
| `emails` | List of addresses, one per line |
| `datasetId` + `emailField` | Read addresses from an Apify dataset (e.g. a contact scraper's output). The field may hold a string or a list. |
| `fileUrl` | Public CSV/TXT link; every address found in the file is checked |
| `maxEmails` | Optional cap on unique addresses |

Duplicates are removed case-insensitively before checking, so you never pay twice for the same address.

### Quick start and verified demo

1. Paste your addresses into **Email addresses** and select **Start**. You can also supply a CSV/TXT URL or a dataset from another Actor.
2. Open **Overview** to review verdicts and **All fields** for the supporting DNS and detection details.
3. Use `good_domain` as a domain-level pre-check, review `risky`, remove or correct `bad`, and retry `unknown` later. A mailbox is never verified by this Actor.

The following synthetic sample was tested on **October 28, 2026**. Six input entries produced **five unique rows** in a completed run of about **3 seconds**:

| Demonstration input | Observed verdict | Interpretation |
|---|---|---|
| `demo@gmail.com` | `good_domain` | Domain accepts mail; mailbox existence is not checked |
| `info@gmail.com` | `risky` | Role-based address for review |
| `demo@mailinator.com` | `bad` | Disposable domain detected |
| `not-an-email` | `bad` | Invalid syntax |
| `demo@example.invalid` | `bad` | Invalid/nonexistent email domain |
| `DEMO@GMAIL.COM` | No additional row | Case-insensitive duplicate removed |

All addresses above are demonstration strings. No messages are sent and no mailbox connection is made. DNS and detection results can change; runtime depends on list size and domain diversity.

```json
{"emails":["demo@gmail.com","info@gmail.com","demo@mailinator.com","not-an-email","demo@example.invalid"," DEMO@GMAIL.COM "],"maxEmails":20}
```

### Output example

```json
{
    "email": "mario@gmial.com",
    "normalizedEmail": "mario@gmial.com",
    "verdict": "bad",
    "score": 0,
    "reasons": ["disposable_domain", "possible_typo"],
    "didYouMean": "mario@gmail.com",
    "mailboxChecked": false,
    "domain": "gmial.com",
    "domainExists": true,
    "acceptsMail": true,
    "mxHosts": ["…"],
    "mailProvider": null,
    "isDisposable": true,
    "isRoleAccount": false,
    "isFreeProvider": false,
    "hasPlusTag": false,
    "spfRecord": null,
    "dmarcRecord": null,
    "checkedAt": "2026-10-28T14:30:00+00:00"
}
```

Reason codes: `missing_or_multiple_at`, `invalid_local_length`, `invalid_local_characters`, `invalid_domain_syntax`, `invalid_tld`, `invalid_domain_encoding`, `domain_not_found`, `domain_accepts_no_mail`, `no_mail_server`, `disposable_domain`, `role_account`, `possible_typo`, `no_mx_record_uses_a_record`, `dns_lookup_failed`.

### Pricing

**$0.0003 per unique address with a decisive result** (`good_domain`, `risky` or `bad`), equivalent to **$0.30 per 1,000**. Analysis platform usage is included. `unknown` results and duplicates are not charged. No start fee.

| Chargeable unique addresses | Analysis price (USD) |
|---|---:|
| 100 | $0.03 |
| 1,000 | $0.30 |
| 10,000 | $3.00 |
| 100,000 | $30.00 |

Prices above cover the analysis event. Separate Apify charges for keeping or accessing stored results are governed by your Apify plan.

### Use cases

- Clean scraped or purchased lead lists before importing into a CRM or email tool.
- Remove disposable and fake sign-ups from a user database.
- Fix typos in customer emails (`didYouMean`).
- Segment B2B leads by mail provider (Google Workspace vs Microsoft 365 vs others).
- Pre-filter lists before paying for a full SMTP verification, so you only verify addresses worth checking.

### Limitations

- No mailbox (SMTP) check: an address on a valid domain may still not exist. Catch-all detection is not possible without SMTP.
- The disposable list is broad but not exhaustive; new throwaway domains appear daily.
- Role-based and free-provider detection are list-based.

### Chain it with other Actors

The `datasetId` input lets you clean the output of any scraper without downloading anything:

1. Run a contact or lead Actor and note its dataset ID.
2. Start this Actor with `datasetId` set to that ID and `emailField` set to the field holding the address (a single string or a list both work).
3. Filter the results on `verdict` and import only `good_domain` rows into your CRM.

### Use it from code

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("bifras/email-list-cleaner").call(
    run_input={"emails": ["demo@gmail.com", "info@gmail.com", "demo@mailinator.com", "not-an-email", "demo@example.invalid", " DEMO@GMAIL.COM "], "maxEmails": 20}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row.get("email"), row.get("verdict"), row.get("reasons", []), row.get("didYouMean"))
```

It also works with the Apify API, schedules, webhooks, Make, Zapier, n8n and Google Sheets.

### FAQ

**Why no SMTP mailbox check?** It needs a server with an open port 25 and a clean sending reputation, and results are often "unknown" anyway (Gmail, Outlook and catch-all servers do not confirm mailboxes). This Actor is built to be fast and cheap for the first pass, and to be honest about what it did not check: `mailboxChecked` is always `false`.

**Is `good_domain` the same as "valid"?** No. It means the address is well-formed and its domain accepts mail. The mailbox may still not exist.

**What should I delete?** Rows with `verdict: "bad"`. Review `risky` rows: role accounts (`info@`) are often fine for B2B outreach, and `didYouMean` shows likely typos you can fix instead of dropping.

**Am I charged for duplicates or errors?** No. Duplicates are merged before checking, and `unknown` results (DNS failures) are free.

**How big can a list be?** Domains are looked up once and reused for every address that shares them, so large lists with repeated domains are fast (about 500 addresses per second in our benchmark of 5,000 addresses over 140 domains). Lists with mostly unique domains take longer, since each domain needs its own lookups. Use `maxEmails` to cap a run.

### Data sources

The disposable domain list comes from [disposable-email-domains](https://github.com/disposable-email-domains/disposable-email-domains) (CC0). DNS queries go to public resolvers (Cloudflare, Google, Quad9), with DNS-over-HTTPS fallback.

# Actor input Schema

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

One address per line. Duplicates are removed automatically (case-insensitive) and charged once.

## `datasetId` (type: `string`):

Read addresses from an Apify dataset, for example the output of a contact or lead scraper.

## `emailField` (type: `string`):

Name of the field that holds the address (or a list of addresses) in each dataset item.

## `fileUrl` (type: `string`):

Public link to a CSV or TXT file. Every email address found in the file is checked.

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

Stop after this many unique addresses. Leave empty for no limit.

## `dnsConcurrency` (type: `integer`):

Parallel domain lookups. The default is fine for most lists.

## Actor input object example

```json
{
  "emails": [
    "john.doe@gmail.com",
    "info@apify.com",
    "someone@mailinator.com",
    "mario@gmial.com",
    "user@example.com"
  ],
  "emailField": "email",
  "dnsConcurrency": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

Verdict, score and main flags for every address.

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

All fields, including MX hosts, SPF and DMARC records.

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

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

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

```

## MCP server setup

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

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/v72y7GUQBRymyvCTZ/builds/4cAhyv1nYY5WBBm5t/openapi.json
