DEV Community

miccho27
miccho27

Posted on

Free Email Validation API — Catch Disposable & Invalid Emails Before They Hit Your Database

Bounced emails kill your sender reputation. Disposable emails pollute your user base. And most email validation APIs charge $50+/month before you even see a result.

I built a free Email Validation API on Cloudflare Workers that checks:

  • Syntax validation (RFC 5322 compliant)
  • MX record verification (does the domain actually accept email?)
  • Disposable email detection (1,000+ throwaway domains)
  • Role-based address detection (info@, support@, admin@)
  • Free provider detection (Gmail, Yahoo, Outlook, etc.)

All in one API call, with sub-50ms response times from 300+ edge locations worldwide.


Quick Start

curl "https://email-validation-api.t-mizuno27.workers.dev/validate?email=test@gmail.com"
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "email": "test@gmail.com",
  "valid": true,
  "disposable": false,
  "role_based": false,
  "free_provider": true,
  "mx_valid": true,
  "domain": "gmail.com",
  "suggestion": null
}
Enter fullscreen mode Exit fullscreen mode

Use Cases

1. Form Validation (Frontend)

async function validateEmail(email) {
  const res = await fetch(
    `https://email-validation-api.t-mizuno27.workers.dev/validate?email=${email}`
  );
  const data = await res.json();

  if (!data.valid) return "Invalid email address";
  if (data.disposable) return "Disposable emails are not allowed";
  if (data.role_based) return "Please use a personal email";
  return null; // Valid
}

// In your form handler
const error = await validateEmail(inputEmail);
if (error) showError(error);
Enter fullscreen mode Exit fullscreen mode

2. Bulk Cleanup (Python)

import requests
import csv

def validate_list(emails):
    results = []
    for email in emails:
        r = requests.get(
            "https://email-validation-api.t-mizuno27.workers.dev/validate",
            params={"email": email}
        )
        data = r.json()
        results.append({
            "email": email,
            "valid": data["valid"],
            "disposable": data["disposable"],
            "action": "keep" if data["valid"] and not data["disposable"] else "remove"
        })
    return results
Enter fullscreen mode Exit fullscreen mode

3. Webhook / Zapier Integration

Trigger on form submission → call the API → route valid emails to your CRM, reject the rest.

Why Not Use [Competitor X]?

Feature This API ZeroBounce Hunter.io NeverBounce
Free tier 500 req/mo 100/mo 25/mo 1,000 one-time
Disposable detection Yes Yes No No
MX verification Yes Yes Yes Yes
Auth required No (free tier) API key API key API key
Response time <50ms 200-500ms 300ms 500ms+

Available on RapidAPI

The easiest way to get started is through RapidAPI, where you get a unified API key and dashboard:

👉 Email Validation API on RapidAPI

Free plan: 500 requests/month, no credit card required.


What's Next?

This is part of my collection of 24 free developer APIs running on Cloudflare Workers. Check out the others:

Got questions? Drop a comment below or find me on GitHub.

Top comments (0)