Menu

1 / 2

Email Validation API: Detect Disposable Emails and Invalid MX Records (Free)

DEV Community·Alexey D·6 months ago
#GOh8a1z2
#python#javascript#api#webdev#email
Reading 0:00
15s threshold

Building a registration or newsletter form? Here is how to validate emails properly — catch typos, disposable addresses, and invalid MX records before they pollute your database.

Why Simple Regex Fails

A regex like ^[^@]+@[^@]+\.[^@]+$ will pass:

❌ [email protected] (no mail server exists)

❌ [email protected] (disposable, will be abandoned)

❌ plainaddress on some implementations

You need real MX record lookup + disposable domain detection.

Email Validator Pro API

RapidAPI link: https://rapidapi.com/adunaev8419/api/email-validator-pro11

Returns: MX validity, disposable flag, quality score (0-100), format check.

Free tier: 30 requests/hour.

Python Example

import requests

url = " https://email-validator-pro11.p.rapidapi.com/validate " headers = { " X-RapidAPI-Key " : " YOUR_KEY " , " Content-Type " : " application/json " }

r = requests . post ( url , json = { " email " : " [email protected] " }, headers = headers ) print ( r .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.