# 📧 Email Verifier - Honest Confidence Score, Not a Fake Yes/No (`that_red_bird/email-verifier`) Actor

⚡ Multi-stage email check: syntax, typo detection (gmial.com -> gmail.com), disposable/role flags, free-vs-corporate class, live MX/DNS lookups. ✅ Returns a 0-100 confidence score plus its signals — and admits mailbox existence can't be proven from a blocked-port-25 cloud host.

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

## Pricing

Pay per event

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 Verifier

A confidence score, not a lie dressed up as a checkmark.

### What this actor CAN prove

- **Syntax** — RFC-ish local/domain validation: length limits (64/253/254), illegal
  characters, quoted local parts (`"john doe"@example.com`), internationalised
  domains (`café.fr` -> `xn--caf-dma.fr`, via Node's own IDNA implementation).
- **Normalisation** — Gmail dot-insensitivity and `+tag` stripping, the `googlemail.com`
  alias, generic `+tag` handling for any provider (via the shared `normalizeEmail` engine).
- **Typo detection** — edit distance against ~70 popular providers, so `user@gmial.com`
  gets suggested `gmail.com` and `user@hotmial.com` gets `hotmail.com`.
- **Disposable/temporary domains** — matched against a bundled, offline list of 400+
  known throwaway-email providers (mailinator, guerrillamail, yopmail, 10minutemail and
  their many mirror domains), including subdomains.
- **Role/generic accounts** — `info@`, `sales@`, `admin@`, `support@`, `noreply@` and
  \~75 other non-personal local parts.
- **Free vs. corporate domain** — a heuristic against a bundled list of well-known free
  webmail providers, not a directory lookup.
- **DNS deliverability** — a live MX lookup over DNS-over-HTTPS (Cloudflare's resolver),
  falling back to an A record per the RFC 5321 implicit-MX rule. No MX and no A means the
  domain cannot receive mail at all — the single strongest "invalid" signal this actor has.

### What this actor CANNOT prove — and says so

**Mailbox existence.** The only way to know whether `jane.doe@acme.com` is a real,
active inbox is an SMTP `RCPT TO` handshake on port 25. Apify, like almost every cloud
host, blocks outbound port 25 to fight spam abuse. So this actor **never** attempts it,
and every single result carries `mailboxVerified: false` with a `mailboxVerifiedReason`
explaining exactly why. Any tool that answers "valid ✅" without that caveat is either
guessing or lying about what it checked — the honesty is the whole point of this actor.

**Catch-all domains.** Telling "accepts everything" apart from "accepts this one address"
also needs an SMTP probe. Stage 8 reports `catchAll.status: "unknown"` with the reason,
rather than fabricating a guess.

### How the confidence score works

Each stage adds or subtracts evidence-weighted points from a neutral baseline (syntax
validity, typo suspicion, disposable/role/domain-type, MX reachability, plus small fixed
penalties for the two things that can never be resolved: catch-all and mailbox
existence). The result is clamped 0-100 and **capped below 100** — a perfect score is
never awarded, because two things are always unverifiable. The `verdict`
(`valid` / `risky` / `invalid` / `unknown`) and the full `signals` array — every
contributing factor with its weight and a human-readable reason — are both returned, so
nothing about the score is a black box.

### Input

```json
{
  "emails": ["jane.doe@gmail.com", "sales@acme-corp.com", "user@gmial.com", "x@mailinator.com"],
  "checkDns": true,
  "checkTypos": true,
  "maxItems": 0
}
```

Also accepts `sourceDatasetIds`, objects with an `email` field (configurable via
`emailField`), `customDisposableDomains`, `customRoleLocalParts`, `onlyFlagged` (skip
`valid` rows in the dataset), and DNS `concurrency`/`dnsTimeoutMs`.

### Output (per address)

`email`, `normalizedEmail`, `domain`, `syntax`, `typoCheck`, `disposable`, `role`,
`domainType`, `dns`, `catchAll`, `mailboxVerified`, `mailboxVerifiedReason`, `verdict`,
`confidence`, `signals`.

### Honest limitations

- Disposable and popular-provider lists are curated snapshots, not a live feed — brand
  new burner domains won't be caught until the list is refreshed.
- Free-vs-corporate is a list lookup, not a WHOIS/registry classification.
- DNS checks depend on Cloudflare's DoH resolver being reachable from the run; if it
  isn't, the verdict becomes `unknown` rather than a guessed `valid`.
- Nothing here, ever, confirms a mailbox actually exists.

# Actor input Schema

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

The addresses to verify, as an array of strings (or objects with an "email" field). Combine freely with sourceDatasetIds.

## `sourceDatasetIds` (type: `array`):

Apify dataset IDs to pull addresses from. Each item's "email" field (or first string field found) is used.

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

Field name to read the address from when an item in "emails" or a source dataset is an object rather than a plain string.

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

Look up MX records (falling back to A records) over DNS-over-HTTPS to confirm the domain can receive mail at all. Turning this off makes the run fully offline but removes the strongest signal.

## `checkTypos` (type: `boolean`):

Compare the domain against ~60 popular email providers by edit distance and suggest a correction for near-misses such as gmial.com or hotmial.com.

## `customDisposableDomains` (type: `array`):

Additional domains to treat as disposable/temporary, on top of the >=300 bundled ones.

## `customRoleLocalParts` (type: `array`):

Additional local parts (the part before @) to treat as role/generic accounts, on top of the bundled list (info, sales, admin, support, noreply, ...).

## `onlyFlagged` (type: `boolean`):

Skip rows verdicted "valid" in the output dataset and keep only risky, invalid and unknown ones. The run summary still counts everything.

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

Stop after verifying this many addresses. 0 means no limit.

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

How many domains to look up over DNS at once.

## `dnsTimeoutMs` (type: `integer`):

How long to wait for each DNS-over-HTTPS lookup before treating it as unavailable.

## Actor input object example

```json
{
  "emails": [
    "jane.doe@gmail.com",
    "j.doe+work@googlemail.com",
    "sales@acme-corp.com",
    "user@gmial.com",
    "throwaway@mailinator.com",
    "not-an-email@@",
    "someone@this-domain-does-not-exist-xyz123.com"
  ],
  "emailField": "email",
  "checkDns": true,
  "checkTypos": true,
  "onlyFlagged": false,
  "maxItems": 0,
  "concurrency": 8,
  "dnsTimeoutMs": 20000
}
```

# Actor output Schema

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

No description

## `downloadCsv` (type: `string`):

No description

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

No description

## `count` (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": [
        "jane.doe@gmail.com",
        "j.doe+work@googlemail.com",
        "sales@acme-corp.com",
        "user@gmial.com",
        "throwaway@mailinator.com",
        "not-an-email@@",
        "someone@this-domain-does-not-exist-xyz123.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("that_red_bird/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": [
        "jane.doe@gmail.com",
        "j.doe+work@googlemail.com",
        "sales@acme-corp.com",
        "user@gmial.com",
        "throwaway@mailinator.com",
        "not-an-email@@",
        "someone@this-domain-does-not-exist-xyz123.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("that_red_bird/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": [
    "jane.doe@gmail.com",
    "j.doe+work@googlemail.com",
    "sales@acme-corp.com",
    "user@gmial.com",
    "throwaway@mailinator.com",
    "not-an-email@@",
    "someone@this-domain-does-not-exist-xyz123.com"
  ]
}' |
apify call that_red_bird/email-verifier --silent --output-dataset

```

## MCP server setup

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