Validate Email API
The Validate Email API allows you to check whether a given email address is valid and return its metadata.
/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
- emailrequired- Email address to validate. 
Headers
- X-Api-Keyrequired- API Key associated with your account. 
Response
- is_validboolean- Whether the email address is valid. 
- domainstring- Domain of the email address. 
- emailstring- Email address. 
- mx_recordsboolean- Whether the domain has MX records. 
- is_disposableboolean- Whether 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.