# Email Validator Pro 📧 (`giovannibiancia/email-validator`) Actor

Advanced email validation actor for Apify platform with comprehensive verification capabilities including SMTP verification, MX record checks, and disposable email detection.

- **URL**: https://apify.com/giovannibiancia/email-validator.md
- **Developed by:** [Giovanni Bianciardi](https://apify.com/giovannibiancia) (community)
- **Categories:** Lead generation, Integrations
- **Stats:** 27 total users, 2 monthly users, 0.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Validator Pro 📧

Advanced email validation actor for Apify platform with comprehensive verification capabilities including SMTP verification, MX record checks, and disposable email detection.

### 🚀 Features

- **📝 Format Validation**: RFC 5322 compliant email format checking
- **🌐 MX Records Check**: Validates domain has valid mail exchange records
- **✉️ SMTP Verification**: Real-time email existence verification via SMTP
- **🔍 Provider Detection**: Identifies free and disposable email providers
- **💡 Smart Suggestions**: Suggests corrections for common domain typos
- **⚡ Batch Processing**: Efficiently processes large email lists
- **🛡️ Rate Limiting**: Built-in delays to prevent abuse
- **📊 Detailed Reporting**: Comprehensive validation results and statistics

### 📋 Input Configuration

#### Required Fields

- **`emails`** (array): List of email addresses to validate

#### Optional Settings

- **`checkSMTP`** (boolean, default: `true`): Enable SMTP verification
- **`rejectDisposable`** (boolean, default: `false`): Mark disposable emails as invalid
- **`batchSize`** (integer, default: `50`): Number of emails per batch (1-100)
- **`delayBetweenChecks`** (number, default: `0.1`): Delay between validations in seconds
- **`maxRetries`** (integer, default: `2`): Maximum retry attempts for SMTP connections
- **`timeout`** (integer, default: `10`): SMTP connection timeout in seconds

### 📤 Output Format

Each email validation returns a detailed result object:

```json
{
  "email": "user@example.com",
  "original_email": "User@Example.com",
  "is_valid": true,
  "valid_format": true,
  "valid_mx": true,
  "valid_smtp": true,
  "is_free": false,
  "is_disposable": false,
  "domain": "example.com",
  "errors": [],
  "warnings": [],
  "suggestions": [],
  "mx_records": ["10:mail.example.com"],
  "smtp_response": "250 OK",
  "validation_time": 1642789123.456
}
```

#### Final Summary Object

```json
{
  "summary": true,
  "total_emails": 1000,
  "valid_emails": 847,
  "invalid_emails": 153,
  "free_emails": 234,
  "disposable_emails": 12,
  "validation_rate": 84.7,
  "processing_time_seconds": 45.2,
  "emails_per_second": 22.1,
  "common_errors": {
    "Invalid email format": 89,
    "Domain has no MX records": 34,
    "Email address does not exist": 30
  },
  "options_used": {...},
  "checks_performed": [...]
}
```

### 🎯 Use Cases

#### Marketing & Lead Generation

- **Email List Cleaning**: Remove invalid emails before campaigns
- **Lead Qualification**: Verify prospect contact information
- **Bounce Rate Reduction**: Improve email deliverability rates

#### E-commerce & SaaS

- **User Registration**: Validate emails during signup
- **Account Recovery**: Ensure password reset emails reach users
- **Newsletter Management**: Clean subscriber lists

#### Data Quality & Compliance

- **Database Maintenance**: Regular email list hygiene
- **GDPR Compliance**: Verify contact consent accuracy
- **CRM Integration**: Enhance customer data quality

### 🛠️ Technical Details

#### Validation Process

1. **Format Check**: RFC 5322 regex validation
2. **Domain Extraction**: Parse email domain
3. **Provider Classification**: Check against free/disposable lists
4. **MX Records**: DNS lookup for mail exchange records
5. **SMTP Verification**: Connect to mail server and verify recipient
6. **Result Compilation**: Generate comprehensive validation report

#### Supported Email Providers

##### Free Providers (200+)

- Gmail, Yahoo, Outlook, Hotmail, AOL
- iCloud, Protonmail, Yandex, Mail.ru
- And many more regional providers

##### Disposable Providers (100+)

- 10minutemail, Tempmail, Guerrillamail
- Mailinator, YOPmail, Maildrop
- Comprehensive list of temporary email services

#### Performance & Limits

- **Throughput**: Up to 50+ emails/second (depending on SMTP response times)
- **Batch Processing**: Configurable batch sizes (1-100 emails)
- **Rate Limiting**: Customizable delays to prevent blocking
- **Retry Logic**: Automatic retries for failed connections
- **Timeout Handling**: Configurable connection timeouts

### 🚨 Important Notes

#### SMTP Verification Considerations

- **Rate Limits**: Some mail servers implement rate limiting
- **False Positives**: Yahoo and some providers may return positive responses for non-existent emails
- **Temporary Failures**: Network issues may cause temporary validation failures
- **Privacy**: SMTP checks involve connecting to external mail servers

#### Best Practices

1. **Start Small**: Test with small batches first
2. **Monitor Results**: Check for high error rates or timeouts
3. **Respect Limits**: Use appropriate delays between checks
4. **Handle Failures**: Plan for temporary network issues
5. **Regular Updates**: Disposable provider lists change frequently

### 📊 Example Usage

#### Basic Email Validation

```json
{
  "emails": [
    "user@gmail.com",
    "test@example.com",
    "invalid@nonexistent.xyz"
  ]
}
```

#### Advanced Configuration

```json
{
  "emails": ["user1@example.com", "user2@test.com"],
  "checkSMTP": true,
  "rejectDisposable": true,
  "batchSize": 25,
  "delayBetweenChecks": 0.2,
  "maxRetries": 3,
  "timeout": 15
}
```

#### Large Scale Processing

```json
{
  "emails": [...], // 10,000+ emails
  "checkSMTP": false, // Faster processing
  "batchSize": 100,
  "delayBetweenChecks": 0.05
}
```

### 🔧 Error Handling

The actor handles various error scenarios gracefully:

- **Invalid Input**: Clear error messages for malformed input
- **Network Issues**: Retry logic for temporary failures
- **Rate Limiting**: Automatic backoff and retry
- **Server Errors**: Detailed error reporting and logging
- **Timeout Handling**: Configurable timeouts with fallback

### 📈 Performance Optimization

#### Speed vs Accuracy Trade-offs

- **Fast Mode**: Disable SMTP checking for format/MX validation only
- **Balanced Mode**: Default settings with moderate SMTP verification
- **Thorough Mode**: Enable all checks with retries for maximum accuracy

#### Batch Size Recommendations

- **Small Lists** (< 100): Batch size 10-25
- **Medium Lists** (100-1000): Batch size 25-50
- **Large Lists** (1000+): Batch size 50-100

### 🆘 Support & Troubleshooting

#### Common Issues

1. **High Invalid Rate**: Check for data quality issues in input
2. **Slow Processing**: Reduce batch size or increase delays
3. **SMTP Timeouts**: Increase timeout values or reduce retries
4. **Memory Issues**: Process very large lists in smaller chunks

#### Getting Help

- Check actor logs for detailed error information
- Review input format and configuration options
- Contact Apify support for platform-specific issues

### 📄 License & Terms

This actor is provided as-is for email validation purposes. Users are responsible for:

- Complying with applicable data protection laws
- Respecting email provider terms of service
- Using validated data ethically and legally
- Maintaining data security and privacy

***

### 🏷️ Tags

`email` `validation` `smtp` `mx-records` `verification` `email-checker` `disposable-email` `bulk-validation` `data-quality` `lead-generation`

***

*Built with ❤️ for the Apify platform*

# Actor input Schema

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

List of email addresses to validate, one per line

## `checkSMTP` (type: `boolean`):

Perform SMTP verification to check if email actually exists

## `rejectDisposable` (type: `boolean`):

Mark disposable emails as invalid

## `batchSize` (type: `integer`):

Number of emails to process in each batch

## `delayBetweenChecks` (type: `integer`):

Delay between email validations in milliseconds (100 = 0.1 seconds)

## `maxRetries` (type: `integer`):

Maximum number of retries for failed SMTP connections

## `timeout` (type: `integer`):

Timeout for SMTP connections

## Actor input object example

```json
{
  "emails": [
    "test@example.com",
    "user@gmail.com",
    "invalid@nonexistentdomain.xyz"
  ],
  "checkSMTP": true,
  "rejectDisposable": false,
  "batchSize": 50,
  "delayBetweenChecks": 100,
  "maxRetries": 2,
  "timeout": 10
}
```

# 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",
        "user@gmail.com",
        "invalid@nonexistentdomain.xyz"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("giovannibiancia/email-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@example.com",
        "user@gmail.com",
        "invalid@nonexistentdomain.xyz",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("giovannibiancia/email-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@example.com",
    "user@gmail.com",
    "invalid@nonexistentdomain.xyz"
  ]
}' |
apify call giovannibiancia/email-validator --silent --output-dataset

```

## MCP server setup

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