Validate Email API
The Validate Email API allows you to check whether a given email address is valid and return its metadata.
API Status
/v1/validateemail GET
https://api.api-ninjas.com/v1/validateemail
Returns metadata (including whether it is valid) for a given email address. This API will check the formatting of the email and the existence of DNS records for the domain to make sure it is a valid email address.
Parameters
emailrequiredEmail address to validate.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
is_validbooleanWhether the email address is valid.
domainstringDomain of the email address.
emailstringEmail address.
mx_recordsbooleanWhether the domain has MX records.
is_disposablebooleanWhether the email address is disposable. We maintain a large database of hundreds of thousands of disposable domains and check against it for every email address.
Sample Request Live Demo!
https://api.api-ninjas.com/v1/validateemail?email=info@api-ninjas.comHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
{
"is_valid": true,
"domain": "api-ninjas.com",
"email": "info@api-ninjas.com",
"mx_records": true,
"disposable": false
}Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/validateemail?email=info@api-ninjas.com" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.