# Email Verifier (Syntax + MX + SMTP) (`andok/email-verifier`) Actor

Verify email deliverability via syntax checks, MX lookups, and a non-intrusive SMTP RCPT probe. Flags disposable domains, role accounts, and catch-all servers. $0.001/email + $0.02 start.

- **URL**: https://apify.com/andok/email-verifier.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 email verifieds

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/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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Verifier (Syntax + MX + SMTP)

Verify email address deliverability through a four-stage pipeline: **syntax validation → MX lookup → SMTP RCPT probe → catch-all detection**, plus disposable-domain and role-account flags. Never sends an actual message — the SMTP probe stops before `DATA`.

### ⚠️ Compliance note

This Actor performs **verification only**. It does not send, receive, or store email content, and it must not be used for harvesting, scraping, or unsolicited mass-mailing purposes. The SMTP probe issues `EHLO` → `MAIL FROM:<>` → `RCPT TO:<email>` → `QUIT` against the target mail server and never sends `DATA` — no message is ever transmitted or delivered. Always ensure you have a legitimate basis (e.g. your own leads/CRM data) for verifying the addresses you submit, and comply with applicable anti-spam and data protection laws (e.g. GDPR, CAN-SPAM) in your jurisdiction.

### Pipeline

1. **Syntax validation** — RFC 5322-inspired regex check
2. **MX lookup** — `dns.resolveMx()`, falling back to the domain's own A record (implicit MX per RFC 5321 §5.1) if no MX records exist
3. **SMTP RCPT probe** — raw `net.createConnection` to port 25, `EHLO` → `MAIL FROM:<>` → `RCPT TO:<email>`, reading the server's real-time accept/reject response — no message is sent
4. **Catch-all detection** — if the real address is accepted, a second probe with a random nonexistent local part at the same domain checks whether the server accepts *everything* (a catch-all configuration)
5. **Disposable domain check** — embedded list of ~65 common temporary-email providers
6. **Role account check** — flags shared mailboxes like `info@`, `admin@`, `support@`

### Input

| Field | Type | Required | Default | Description |
|-------|------|-----------|---------|-------------|
| `emails` | `array` | Yes | — | Email addresses to verify (max 10,000) |
| `concurrency` | `integer` | No | `10` | Parallel verification workers (1-50) |

#### Input Example

```json
{
  "emails": ["jane.doe@example.com", "info@example.com", "not-an-email"],
  "concurrency": 10
}
````

### Output

```json
{
  "email": "jane.doe@example.com",
  "status": "valid",
  "mx_ok": true,
  "disposable": false,
  "role_account": false
}
```

| Field | Description |
|-------|-------------|
| `email` | The input email address |
| `status` | `"valid"`, `"invalid"`, `"catch_all"`, or `"unknown"` |
| `mx_ok` | Whether the domain has a usable mail server (MX or fallback A record) |
| `disposable` | `true` if the domain matches a known disposable/temporary email provider |
| `role_account` | `true` if the local part looks like a shared role mailbox (e.g. `admin`, `support`) |
| `error` | Present when `status` is `"invalid"` or `"unknown"`, or on a partial failure |

#### Status meanings

| Status | Meaning |
|--------|---------|
| `valid` | Syntax OK, domain has mail servers, and the mailbox was explicitly accepted (RCPT 2xx) by a non-catch-all server |
| `invalid` | Bad syntax, domain has no mail servers at all, **or** the mail server explicitly rejected the mailbox (RCPT 5xx) |
| `catch_all` | The mail server accepts *any* recipient at this domain, so individual mailbox existence cannot be confirmed |
| `unknown` | The check could not be completed — DNS timeout, connection refused/timed out, port 25 blocked, greylisting, or a temporary (4xx) SMTP response. **Connection failures are always reported as `unknown`, never `invalid`.** |

### Pricing

| Event | Cost |
|-------|------|
| Actor start | $0.02 |
| Email Verified | $0.001 |

**Typical run cost:** 1,000 emails ≈ `$0.02 + 1,000 × $0.001 = $1.02`.

### Limitations

- **Outbound port 25 is frequently blocked** by cloud providers (including many hosting/PaaS platforms) to prevent spam. If SMTP connections are blocked in your run environment, most results will come back as `unknown` rather than `valid`/`invalid` — this is expected behavior for the "never guess invalid on connection failure" safety rule, not a bug.
- Some large providers (e.g. Gmail, Outlook) intentionally delay or obscure RCPT-level rejections for anti-enumeration reasons, which can also surface as `unknown` or false `catch_all` results.
- Per-mail-server throttling (minimum 1-second gap between connections to the same MX host) means verifying thousands of addresses at the *same* domain will take proportionally longer — this is intentional to avoid being blocklisted.
- The disposable-domain list is a fixed embedded snapshot (~65 domains) and will not catch brand-new or obscure temporary-email providers.
- No retries are performed on transient failures; re-run the Actor with the `unknown` subset if you need another attempt.

### Use Cases

- Clean email lists before a marketing campaign to reduce bounce rates
- Validate signup-form submissions asynchronously
- Enrich CRM contact records with deliverability and role-account flags
- Pre-filter disposable-email signups for fraud/abuse prevention

# Actor input Schema

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

List of email addresses to verify (max 10,000 per run).

## `concurrency` (type: `integer`):

Number of emails verified in parallel. Connections to the same mail server are still throttled to a minimum 1-second gap regardless of this setting.

## Actor input object example

```json
{
  "emails": [
    "test@example.com"
  ],
  "concurrency": 10
}
```

# Actor output Schema

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

No description

## `resultsCsv` (type: `string`):

No description

## `run` (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": [
        "test@example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/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": ["test@example.com"] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Email Verifier (Syntax + MX + SMTP)",
        "description": "Verify email deliverability via syntax checks, MX lookups, and a non-intrusive SMTP RCPT probe. Flags disposable domains, role accounts, and catch-all servers. $0.001/email + $0.02 start.",
        "version": "1.0",
        "x-build-id": "tY4K2aqUMfsf9gIPy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/andok~email-verifier/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-andok-email-verifier",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/andok~email-verifier/runs": {
            "post": {
                "operationId": "runs-sync-andok-email-verifier",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/andok~email-verifier/run-sync": {
            "post": {
                "operationId": "run-sync-andok-email-verifier",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "emails"
                ],
                "properties": {
                    "emails": {
                        "title": "Emails",
                        "minItems": 1,
                        "maxItems": 10000,
                        "type": "array",
                        "description": "List of email addresses to verify (max 10,000 per run).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "concurrency": {
                        "title": "Concurrency",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Number of emails verified in parallel. Connections to the same mail server are still throttled to a minimum 1-second gap regardless of this setting.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
