DEV Community

miccho27
miccho27

Posted on

Validate Emails for Free — Catch Disposable & Fake Addresses with One API Call

🚀 Try it free — Syntax, MX, and disposable email checks in one request.
Get the Email Validation API on RapidAPI →

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 (1)

Collapse
 
francofuji profile image
Francisco Perez

The disposable domain blocklist approach is useful, but any static list of ~1000 domains will have gaps because new disposable services spin up faster than lists can track them. The more durable signal is domain age combined with MX reputation: legitimate business domains have months or years of DNS history, while throwaway-oriented domains are often days or weeks old. Pairing your MX check with a WHOIS/domain age lookup catches a large class of new providers that haven't made it onto any blocklist yet.

One nuance worth surfacing for readers building developer tooling: not all disposable inboxes are spam signals. Services like uncorreotemporal.com exist specifically for automated testing — CI pipelines that need to verify email delivery flows without touching production mailboxes. If you're building a validation layer for a SaaS product, it's worth differentiating "disposable domain submitted in a signup form" from "disposable domain called via API key" — the latter is often a developer legitimately testing their own integration.