# Email Address Validator (`api-ninja/email-address-validator`) Actor

✅ Validate email lists with a two-step verification pipeline: regex structure check followed by internal 2-step validation. Perfect for CRM cleanup, lead qualification, and campaign hygiene.

- **URL**: https://apify.com/api-ninja/email-address-validator.md
- **Developed by:** [API ninja](https://apify.com/api-ninja) (community)
- **Categories:** Lead generation, Automation, Other
- **Features:** Limited permissions
- **Stats:** 319 total users, 43 monthly users, 100.0% runs succeeded, 14 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Verifier Actor

Validate email lists with a clear two-step pipeline: **regex structure check** first, then **precheck + final validation** through external verification APIs.\
This is a standalone **email validation API workflow** for no-code and low-code users on Apify who need reliable output for CRM cleanup, lead qualification, and campaign hygiene.

If you already have a list of emails, run this Actor in minutes: provide `emails`, start a run, and download structured results from the dataset.

### What does this email verification Actor do?

This Actor verifies each email address in your input and returns a structured status for every record. It helps you separate invalid formats from addresses that fail technical checks, and from addresses that pass full validation.

It is a **verification workflow Actor**, not a mailbox inbox checker and not a sender reputation tool.

### Why use this email validation API workflow?

- 📈 Keep CRM records clean before outreach
- 🎯 Improve deliverability for cold email and newsletter campaigns
- 🧹 Remove obviously bad addresses before enrichment
- ⚙️ Automate recurring verification with Apify schedules
- 🔌 Feed verified emails to downstream tools through API/integrations

### What can this email verification Actor do?

- ✅ Validate email format with regex before calling any external API
- ✅ Run **Precheck** for emails that pass regex
- ✅ Run **Final Validation** only for emails that pass precheck
- ✅ Process emails in fixed batches of 10 for predictable throughput
- ✅ Retry failed API calls up to 3 times with 1-second delays
- ✅ Push all results to Apify dataset with consistent fields
- ✅ Log detailed progress, endpoint path, and params for troubleshooting
- ✅ Handle unexpected failures gracefully and exit with clear error logs

#### Why use it on Apify platform from day one?

- 📊 Run history, logs, and monitoring in one place
- 🔁 Scheduling and automation-ready runs
- 🔌 Easy API access to trigger runs and fetch results
- 📁 Dataset export in JSON, CSV, Excel, XML, and RSS
- 🧩 Integration with Make, Zapier, webhooks, and custom pipelines

### What data can this Actor extract?

The Actor writes one dataset item per input email.

| Field | Type | Description |
|---|---|---|
| `email` | string | Original input email |
| `valid_email` | boolean | Final single-source verdict for the email |
| `regex_valid` | boolean | Whether basic email regex passed |
| `status` | string | Pipeline outcome (`regex_failed`, `precheck_failed`, `precheck_rejected`, `validation_check_failed`, `validation_check_passed`) |
| `precheck` | object/null | Raw precheck response |
| `validation_check` | object/null | Raw final validation response |
| `error` | string/null | Error details when an API stage fails |

### How to verify email lists on Apify

Open this Actor page and start from the **Input** tab:\
`https://console.apify.com/actors/<YOUR_ACTOR_ID>/input`

1. Open the Actor and go to the **Input** tab.
2. Add your email list to `emails` (array of strings).
3. Click **Start**.
4. Wait for run completion, then open the **Output** tab.
5. Download the dataset in your preferred format.

#### How to verify email lists in Python

Use Apify API to trigger runs programmatically and pull dataset items after completion.\
API docs: https://docs.apify.com/api/v2

### Input example

```json
{
  "emails": [
    "john@example.com",
    "invalid-email",
    "sales@company.org"
  ]
}
```

### Output example

```json
[
  {
    "email": "invalid-email",
    "valid_email": false,
    "regex_valid": false,
    "status": "regex_failed",
    "precheck": null,
    "validation_check": null,
    "error": "Invalid email structure by regex validation."
  },
  {
    "email": "john@example.com",
    "valid_email": true,
    "regex_valid": true,
    "status": "validation_check_passed",
    "precheck": {
      "success": true,
      "email": "john@example.com"
    },
    "validation_check": {
      "valid": true,
      "email": "john@example.com"
    },
    "error": null
  }
]
```

### How much does email verification cost?

Cost depends on runtime and provider-side API usage. On Apify, you mainly pay for consumed compute (CUs), while email volume and response speed impact total run duration.

Practical expectation:

- Small lists (tens to low hundreds) are typically low cost.
- Larger lists scale predictably because processing is batched and retried with limits.
- You can estimate costs by running a sample (for example 100 emails), then extrapolating.

For best budget control, test on a representative subset first and monitor run logs + CU usage.

### Tips for best results

- Use clean input with trimmed email strings.
- Remove duplicates before running for lower cost and faster output.
- Start with a sample batch to validate your expected statuses.
- Treat `precheck_rejected` and `validation_check_failed` differently in your downstream workflow.
- Re-run only failed subsets if provider/API errors are temporary.

### Related links and integrations

- Apify API reference: https://docs.apify.com/api/v2
- Apify scheduling: https://docs.apify.com/platform/schedules
- Apify integrations (Make, Zapier, webhooks): https://apify.com/integrations
- Apify Academy: https://docs.apify.com/academy

If you publish other data collection Actors (for example email discovery/contact scraping), link them here as companion workflows.

### FAQ

#### Is this Actor a standalone email verification API workflow?

Yes. You provide a list of emails, and the Actor handles the full multi-step verification flow and returns normalized output.

#### Can I use this without coding?

Yes. Use the Apify Console input form and export results from the Output tab.

#### Can I automate it?

Yes. Trigger runs via Apify API, schedule recurring runs, and connect outputs to downstream tools.

#### Does this Actor guarantee inbox existence?

No tool can guarantee 100% inbox existence in all cases. Use results as a strong technical validation signal, not absolute deliverability certainty.

#### What if an API call fails?

Each API call is retried up to 3 times with a 1-second wait. If still unsuccessful, the error is recorded in `error` and processing continues.

#### Is this legal to use?

This Actor only processes email addresses that you provide as input. You are responsible for lawful data collection and use in your jurisdiction (including GDPR/CCPA and anti-spam rules where applicable).

### Support

If you need custom output fields, stricter validation rules, or integration-specific formats, open an issue or contact the maintainer.\
When reporting issues, include:

- Run URL
- Input sample (non-sensitive)
- Expected vs actual output
- Relevant log lines

# Actor input Schema

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

Provide email addresses to verify.

## Actor input object example

```json
{
  "emails": [
    "test@gmail.com"
  ]
}
```

# 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": [
        "test@gmail.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-ninja/email-address-validator").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@gmail.com"] }

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

```

## MCP server setup

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

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/Xi2OmxkeFT2ortjtO/builds/iwTbfw0Sx6UQObnJO/openapi.json
