# Email Verifier Actor

[![Email Verifier Actor](https://apify.com/actor-badge?actor=tomba-io/email-verifier)](https://apify.com/tomba-io/email-verifier)

A powerful Apify Actor that **verifies the validity of any professional email address with the most complete email checker** using the **Tomba Email Verifier API**. Perfect for email marketing, lead generation, and data quality assurance by ensuring your email lists contain only valid, deliverable addresses.

## Key Features

- **Complete Email Verification**: Comprehensive validity checks for professional email addresses
- **Deliverability Testing**: Real-time SMTP validation and mailbox verification
- **Risk Assessment**: Identify disposable, webmail, and risky email addresses
- **Bulk Processing**: Verify hundreds of emails efficiently with rate limiting
- **Rate Limited**: Respects Tomba's 150 requests per minute limit
- **Rich Verification Data**: Detailed verification scores and technical checks
- **Built-in Error Handling**: Robust processing with comprehensive error reporting

## How it works

The Actor leverages Tomba's powerful Email Verifier API to perform comprehensive email validation:

### Process Flow

1. **Authentication**: Connects to Tomba API using your credentials
2. **Input Processing**: Accepts array of email addresses to verify
3. **Email Verification**: Uses Tomba's `emailVerifier` method for each email
4. **Validation Checks**: Performs regex, SMTP, MX record, and deliverability tests
5. **Rate Limiting**: Automatically handles 150 requests/minute limit
6. **Data Storage**: Saves detailed verification results to Apify dataset

### What You Get

For each verified email, you'll receive:

- **Verification Result**: Valid, invalid, risky, or unknown status
- **Confidence Score**: 0-100 score indicating verification confidence
- **Technical Checks**: Regex validation, MX records, SMTP server status
- **Risk Factors**: Disposable email detection, webmail identification
- **Deliverability**: Accept-all domain detection, block status
- **Quality Metrics**: Gibberish detection and comprehensive analysis

## Quick Start

### Prerequisites

1. **Tomba Account**: Sign up at [Tomba.io](https://app.tomba.io/api) to get your API credentials

### Getting Your API Keys

1. Visit [Tomba API Dashboard](https://app.tomba.io/api)
2. Copy your **API Key** (starts with `ta_`)
3. Copy your **Secret Key** (starts with `ts_`)

## Input Configuration

### Required Parameters

| Parameter        | Type     | Description                        |
| ---------------- | -------- | ---------------------------------- |
| `tombaApiKey`    | `string` | Your Tomba API key (ta_xxxx)       |
| `tombaApiSecret` | `string` | Your Tomba secret key (ts_xxxx)    |
| `emails`         | `array`  | Array of email addresses to verify |

### Optional Parameters

| Parameter    | Type     | Default | Description                         |
| ------------ | -------- | ------- | ----------------------------------- |
| `maxResults` | `number` | `50`    | Maximum number of results to return |

### Example Input

```json
{
    "tombaApiKey": "ta_xxxxxxxxxxxxxxxxxxxx",
    "tombaApiSecret": "ts_xxxxxxxxxxxxxxxxxxxx",
    "emails": [
        "john.doe@company.com",
        "sales@example.org",
        "support@startup.io",
        "invalid@fakeemail.xyz"
    ],
    "maxResults": 100
}
```

### Best Practices

- **Email Quality**: Use properly formatted email addresses for best results
- **Rate Limits**: The Actor automatically handles Tomba's 150 requests/minute limit
- **Batch Size**: Process 50-100 emails at a time for optimal performance
- **Data Cleaning**: Pre-filter obvious invalid formats to save API credits

## Output Data Structure

The Actor returns comprehensive verification information for each email:

```json
{
    "email": {
        "email": "b.mohamed@tomba.io",
        "result": "deliverable",
        "status": "valid",
        "score": 99,
        "smtp_provider": "Google Workspace",
        "mx": {
            "records": [
                "aspmx.l.google.com",
                "alt2.aspmx.l.google.com",
                "alt1.aspmx.l.google.com",
                "alt4.aspmx.l.google.com",
                "alt3.aspmx.l.google.com"
            ]
        },
        "mx_check": true,
        "smtp_server": true,
        "smtp_check": true,
        "accept_all": false,
        "greylisted": false,
        "block": true,
        "gibberish": false,
        "disposable": false,
        "webmail": false,
        "regex": true,
        "whois": {
            "registrar_name": "namecheap, inc.",
            "referral_url": "https://www.namecheap.com/",
            "created_date": "2020-07-07T20:54:07+02:00"
        }
    },
    "sources": [
        {
            "uri": "https://github.com/tomba-io/generic-emails/blob/084fc1a63d3cdaf9a34f255bedc2baea49a8e8b9/src/lib/validation/hash.ts",
            "website_url": "github.com",
            "extracted_on": "2021-02-08T20:09:54+01:00",
            "last_seen_on": "2021-02-08T22:43:40+01:00",
            "still_on_page": true
        }
    ],
    "input": "b.mohamed@tomba.io"
}
```

### Data Fields Explained

#### Email Verification Object

- **email**: The verified email address
- **result**: Deliverability status (deliverable, undeliverable, risky, unknown)
- **status**: Validation status (valid, invalid, risky, unknown)
- **score**: Confidence level from 0-100 (higher is better)
- **smtp_provider**: Email provider name (e.g., "Google Workspace", "Microsoft Exchange")

#### Technical Validation

- **regex**: Whether email passes basic format validation
- **gibberish**: Whether email appears to be random/meaningless
- **disposable**: Whether email is from a temporary email service
- **webmail**: Whether email is from Gmail, Yahoo, etc.
- **mx_check**: Whether MX records check passed
- **smtp_server**: Whether SMTP server is reachable
- **smtp_check**: Whether SMTP validation was successful
- **accept_all**: Whether domain accepts all email addresses
- **greylisted**: Whether the email is greylisted
- **block**: Whether email is on a blocklist

#### Additional Data

- **mx**: Object containing MX record servers array
- **whois**: Domain registration information (registrar, creation date, etc.)
- **sources**: Array of sources where the email was found online
- **input**: Original input email address for reference

## Use Cases

### Email Marketing

- **List Cleaning**: Remove invalid emails before campaigns
- **Bounce Reduction**: Prevent hard bounces and protect sender reputation
- **Quality Assurance**: Ensure high deliverability rates

### Lead Generation

- **Lead Qualification**: Verify contact information quality
- **Data Validation**: Clean imported lead lists
- **CRM Integration**: Maintain clean contact databases

### Data Quality

- **Database Maintenance**: Regular cleanup of email databases
- **Import Validation**: Verify emails during data import
- **Compliance**: Ensure GDPR/CAN-SPAM compliance with valid contacts

### Risk Management

- **Fraud Prevention**: Identify disposable and risky email addresses
- **User Registration**: Validate emails during account creation
- **Security**: Block known problematic email domains

## Verification Views

The Actor provides specialized data views:

### Overview View

Quick summary showing email, result, score, and key flags

### Valid Emails View

Filtered view showing only successfully verified emails

### Invalid Emails View

Focus on failed verifications with error details

### Verification Errors View

Troubleshoot processing issues and API errors

## Resources & Documentation

### API Documentation

- [Tomba API Docs](https://tomba.io/api) - Complete API reference
- [Email Verifier Endpoint](https://docs.tomba.io/api/verifier#email-verifier) - Specific verification documentation
- [Authentication Guide](https://app.tomba.io/api) - Get your API keys
- [Pricing & Limits](https://tomba.io/pricing) - Understand rate limits and costs

### Rate Limiting

- Tomba limits to **150 requests per minute**
- Actor automatically handles rate limiting with delays
- Large email lists may take time to complete

### Cost Considerations

- Each email verification = 1 Tomba API request
- Monitor your Tomba usage dashboard
- Consider Tomba's pricing tiers for volume usage

### Best Practices

- **Pre-filtering**: Remove obvious invalid formats before verification
- **Batch Processing**: Group verifications for efficiency
- **Result Interpretation**: Use score and multiple flags for decision making
- **Regular Cleaning**: Periodically re-verify older email lists

## FAQ

### General Questions

**Q: What does email verification do?**
A: Email verification checks if an email address is valid, deliverable, and safe to send to. It validates syntax, domain existence, mailbox availability, and identifies risky addresses.

**Q: How accurate is email verification?**
A: Tomba's verification is highly accurate (95%+) for most standard email providers. Results include confidence scores and detailed status information to help you make informed decisions.

**Q: What's the difference between syntax and deliverability checking?**
A: Syntax checking validates the email format (user@domain.com), while deliverability checking contacts the mail server to verify the mailbox actually exists and can receive mail.

### Verification Results

**Q: What do the different verification statuses mean?**
A:

- **Valid**: Email exists and can receive mail
- **Invalid**: Email doesn't exist or can't receive mail
- **Risky**: Email might bounce or be problematic
- **Unknown**: Verification couldn't be completed

**Q: What is a verification score?**
A: Scores range 0-100 indicating confidence level. 90+ is high confidence, 70-89 is moderate, below 70 suggests caution. Use scores along with status for best results.

**Q: What are catch-all domains?**
A: Catch-all domains accept emails to any address at that domain, even non-existent ones. They're marked as "risky" because you can't verify if the specific mailbox exists.

**Q: How should I handle "risky" emails?**
A: Risky emails might include catch-all domains, role accounts, or temporary emails. Consider your use case - they might be fine for newsletters but problematic for transactional emails.

### Technical Questions

**Q: How many emails can I verify at once?**
A: You can submit up to 1000 emails per run. For optimal performance, process 50-200 emails per batch.

**Q: What are the rate limits?**
A: The Actor automatically handles Tomba's rate limits. Large batches will be processed with appropriate delays to stay within limits.

**Q: Can I verify emails in real-time?**
A: Yes, but for real-time use cases, consider the API response time (typically 1-3 seconds per email). Batch processing is more efficient for large lists.

**Q: Do you store or cache verification results?**
A: Tomba may cache results temporarily for performance. The Actor doesn't store your email lists - data is processed and returned through Apify's secure infrastructure.

### Email List Management

**Q: How often should I re-verify emails?**
A: Re-verify emails every 3-6 months, as email validity changes over time. High-bounce lists may need more frequent verification.

**Q: Should I remove all risky emails?**
A: Not necessarily. Review risky emails case-by-case. Some might be legitimate business emails that are just hard to verify due to server configurations.

**Q: What about role-based emails (info@, sales@)?**
A: Role emails are flagged as "role-based" but may still be valid for business communications. Consider your specific use case.

**Q: How do I handle large email lists?**
A: Break large lists into smaller batches (200-500 emails). Monitor your API quota and consider Tomba's higher-tier plans for volume processing.

### Privacy & Compliance

**Q: Is email verification GDPR compliant?**
A: Yes, verification only checks deliverability without accessing email content. However, ensure you have permission to verify the email addresses you're checking.

**Q: Do you notify email owners during verification?**
A: No, verification is done through server-level checks that don't send actual emails or notify the email owners.

**Q: Can I verify international email addresses?**
A: Yes, Tomba supports verification for email addresses worldwide, including international domains and various country-specific providers.

## Support

If you need any help, have questions, or encounter any issues while using Tomba.io, please don't hesitate to reach out to our support team. You can contact us via:

- **Email**: support@tomba.io
- **Live chat**: Available on the Tomba.io website during business hours

## Contributing

We welcome contributions to improve this actor. Please feel free to submit issues, feature requests, or pull requests to help make this tool even better for the community.
