# Bulk Email Verifier - Validate & Clean Email Lists (`protective_flatland/email-verifier`) Actor

Validate email addresses in bulk: syntax, MX, disposable, role-based, SMTP.

- **URL**: https://apify.com/protective_flatland/email-verifier.md
- **Developed by:** [zsdy](https://apify.com/protective_flatland) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 57.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## Bulk Email Verifier

### Try it first

Paste a few addresses you want to validate into **emails**, leave **SMTP verification** off for the first run, and use the prefilled limit of 100. Open **Dataset** to review each verdict; export CSV for spreadsheet review. Before running, check the Store Pricing tab: the maximum event charge is `maxItems × current per-address price + any start event`; the run page shows any separate platform-resource usage.

```json
{
  "emails": [
    "audit@gmail.com",
    "invalid-address",
    "info@example.com"
  ],
  "smtpVerification": false,
  "maxItems": 3
}
```

Validate email syntax, examine domain MX records, flag known disposable providers and role accounts, and optionally observe SMTP recipient acceptance. Results express the strength of the evidence; a working domain does not establish that a mailbox exists.

### Input

| Field | Type | Description |
|---|---|---|
| `emails` | array or delimited string | At least one address is required. Exact trimmed duplicates are removed. |
| `smtpVerification` | boolean | Default `false`. Optional SMTP probe; sends HELO, null MAIL FROM and RCPT, never DATA. |
| `maxItems` | integer | Maximum addresses per run, default 1000; must be at least 1. |
| `maxConcurrency` | integer | Concurrent checks, default 5; must be 1–20. |

DNS queries have a 10-second lifetime. Each run shares one DNS lookup per normalized domain, including negative/error results, to avoid duplicate work. This cache is a run-scoped snapshot, not a persistent TTL cache; rerun to retry temporary DNS failures. Batches bound both active checks and scheduled work, and output follows input order. After a charge limit is reported, already checked addresses in that batch may not be emitted.

### Output and interpretation

```json
{
  "email": "Alice@gmail.com",
  "result": "unknown",
  "reason": "smtp_not_checked",
  "syntaxValid": true,
  "localPart": "Alice",
  "domain": "gmail.com",
  "mxFound": true,
  "dnsStatus": "found",
  "mxRecords": ["gmail-smtp-in.l.google.com"],
  "isDisposable": false,
  "isRoleAccount": false,
  "isFreeProvider": true,
  "smtpCheck": "skipped",
  "smtpCode": null
}
```

The MX hostname above illustrates the output shape; live DNS can differ.

| Result | Meaning |
|---|---|
| `deliverable` | SMTP RCPT returned 250/251. This only establishes acceptance at probe time, not inbox delivery. |
| `unknown` | No mailbox evidence: SMTP skipped, DNS timeout/error, no explicit MX, malformed MX, temporary SMTP failure, policy/permanent rejection, or connection failure. |
| `risky` | Domain has usable MX and address is a known disposable provider or role account, with SMTP skipped or accepted. These flags do not establish mailbox existence. |
| `undeliverable` | Invalid supported syntax, NXDOMAIN, valid null MX, or explicit RCPT mailbox-not-found (`5.1.1`) from all attempted hosts. |

`dnsStatus` is `skipped`, `found`, `no_mx`, `null_mx`, `nxdomain`, `timeout`, `dns_error`, or `invalid_mx`. DNS timeouts, SERVFAIL and resolver failures never become “no MX.” A sole `0 .` MX explicitly refuses email (RFC 7505); mixed or nonzero null MX is malformed and remains unknown. No explicit MX is unknown because SMTP can use implicit A/AAAA routing (not checked here). `mxFound` is null if DNS was skipped, failed, or malformed; false means an authoritative negative outcome, not necessarily an unusable domain. At most three MX hostnames appear in output.

`smtpCheck` is `skipped`, `valid`, `invalid`, `temporary_failure` (4xx), `permanent_rejection` (other 5xx), or `unknown`. The probe tries at most two MX hosts in preference order, with 10-second socket timeouts. It checks greeting, HELO and MAIL responses before RCPT. A bare 550, 5.7.x policy block, mailbox-full response, or sender rejection does not establish mailbox absence. Disagreement between hosts remains unknown unless one accepts the recipient. `smtpCode` records the representative reply code; raw server replies are not retained.

Syntax validation uses `email-validator` without its DNS checking. Local-part case is preserved; domains are lower-cased and IDNA encoded. Dot/length/domain-label constraints are enforced. Display names, quoted local parts, domain literals, reserved special-use names and SMTPUTF8 local parts are unsupported and return `invalid_syntax`. The probe does not negotiate SMTPUTF8 or TLS. Static disposable/role/free-provider lists are heuristic and incomplete. Catch-all acceptance, anti-enumeration, greylisting, source-IP policy and later bounces limit SMTP evidence; no real message is sent.

### Dependencies and offline tests

`requirements.txt` pins direct dependencies to releases verified from PyPI and present in the verification environment: `apify==4.2.1`, `dnspython==2.9.2`, `email-validator==2.4.0`. Transitive dependencies are not locked. The image uses Python 3.13; these releases declare support for it.

From this directory:

```sh
python3 -m unittest discover -s tests -v
```

All tests mock DNS, SMTP and Actor operations, and block real socket connections. No live SMTP is required or performed.

### Pricing

Pay per result: **$1 per 1,000 addresses**. You only pay for emitted result rows.

# Actor input Schema

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

Addresses to check. Accepts a list or delimited text; trimmed duplicates are removed. At least one address is required.

## `smtpVerification` (type: `boolean`):

Observe SMTP recipient acceptance without sending a message. Acceptance does not prove inbox delivery; timeout, policy rejection and temporary failure remain unknown.

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

Number of address checks in flight; must be 1–20. Same-domain DNS queries share a run-scoped cache.

## `maxItems` (type: `integer`):

Maximum number of addresses to verify per run; must be at least 1.

## Actor input object example

```json
{
  "emails": [],
  "smtpVerification": false,
  "maxConcurrency": 5,
  "maxItems": 100
}
```

# Actor output Schema

## `results` (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": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("protective_flatland/email-verifier").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": [] }

# Run the Actor and wait for it to finish
run = client.actor("protective_flatland/email-verifier").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": []
}' |
apify call protective_flatland/email-verifier --silent --output-dataset

```

## MCP server setup

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

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/bTphs6bNbsSXeFcp0/builds/abfnz3uyozxEC0BM9/openapi.json
