# Email Hygiene Checker (`itsoul/email-hygiene-checker`) Actor

- **URL**: https://apify.com/itsoul/email-hygiene-checker.md
- **Developed by:** [Mahmoud Alhamdo](https://apify.com/itsoul) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 email checkeds

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 Hygiene Checker

Clean an email list **before you send**. For every address the Actor checks the syntax, confirms the domain can receive mail (MX records), flags **disposable** and **role** addresses (`info@`, `support@`), and catches **typos** such as `gmial.com` with a `didYouMean` fix. Fast, cheap, and built for lists of thousands.

### What it does and does not do

**Does:**

- Strict syntax validation (RFC-style rules, length limits, double dots)
- MX lookup once per unique domain, so large lists stay fast and cheap
- Disposable-domain detection (mailinator, guerrillamail, yopmail and more)
- Role-account detection, free-provider flag (Gmail, Outlook, Yahoo...)
- Typo suggestions for common providers

**Does not:** connect to mail servers to test whether a specific mailbox exists (no SMTP probing, no catch-all detection). That is deliberate: mailbox probing from cloud IPs is unreliable and can get you blocked. A `likely_valid` verdict means the address is well formed, the domain accepts mail and nothing looks suspicious. It is not a guarantee of delivery. If you need mailbox-level verification, run the `likely_valid` and `risky` addresses through an SMTP verifier afterwards, and save money by dropping the `invalid` ones here first.

### Verdicts

| Verdict | Meaning |
| --- | --- |
| `likely_valid` | Good syntax, domain accepts mail, no red flags |
| `risky` | Disposable domain, role account or lookup problem |
| `invalid` | Bad syntax, or the domain has no mail server |

`score` runs from 0 to 100 and `reasons` lists every flag that applied.

### Input

| Field | Description |
| --- | --- |
| `emails` | Addresses to check (duplicates removed) |
| `checkMx` | Look up MX records (default on) |
| `maxEmails` | Cap per run |

### Example output

```json
{
  "email": "john.doe@gmial.com",
  "verdict": "invalid",
  "score": 0,
  "reasons": ["domain_has_no_mail_server"],
  "didYouMean": "john.doe@gmail.com",
  "hasMxRecords": false
}
```

### Pricing

Pay per event: a small fee at start and a fee per email checked.

# Actor input Schema

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

Addresses to check. Duplicates are removed (case-insensitive).

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

Look up the domain's MX records to confirm it can receive mail. One lookup per unique domain.

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

Hard cap per run. You are charged per email checked.

## Actor input object example

```json
{
  "emails": [
    "hello@apify.com",
    "john.doe@gmial.com",
    "someone@mailinator.com",
    "info@example.com",
    "not-an-email"
  ],
  "checkMx": true,
  "maxEmails": 5000
}
```

# 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": [
        "hello@apify.com",
        "john.doe@gmial.com",
        "someone@mailinator.com",
        "info@example.com",
        "not-an-email"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("itsoul/email-hygiene-checker").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": [
        "hello@apify.com",
        "john.doe@gmial.com",
        "someone@mailinator.com",
        "info@example.com",
        "not-an-email",
    ] }

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

```

## MCP server setup

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

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/KzV0ArIBShbfibblC/builds/XIczMsmyfcysNHtpf/openapi.json
