DEV Community

Daniel Igel
Daniel Igel

Posted on

Cut signup spam: syntax + MX + disposable email validation in one call

Client-side regex catches typos, not throwaway inboxes. By the time a fake test@mailinator.com is in your DB, your activation rate and sender reputation already took the hit.

This API does three checks in one request: RFC-5322 syntax, a live MX lookup (does the domain actually accept mail?), and a disposable/role-based check (info@, admin@, temp-mail domains). It also suggests fixes for obvious typos like gmail.con.

curl --request GET \
  --url 'https://email-validation-api37.p.rapidapi.com/api/v1/validate?email=test@gmail.con' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
  --header 'x-rapidapi-host: email-validation-api37.p.rapidapi.com'
Enter fullscreen mode Exit fullscreen mode

You get back validity, MX status, disposable/role_based flags, and a did_you_mean suggestion. There's a batch endpoint (POST /api/v1/validate) for cleaning an existing list.

Free tier on RapidAPI: https://rapidapi.com/danieligel/api/email-validation-api37

Built this to gate signups on a side project. Curious what your stack currently does for MX checks — happy to compare notes.

Top comments (0)