GET/v1/validate/email
Check an email address: syntax, normalised form, disposable and role-based flags, optional MX lookup
Set mx=true to also check that the domain publishes MX records (a live DNS query).
PARAMETERS
- emailquery · stringREQUIRED
- Address to checke.g. Jane.Doe+news@gmail.com
- mxquery · boolean
- Also look up MX records for the domaine.g. false
REQUEST
curl "https://api.apialmanac.com/v1/validate/email?email=Jane.Doe%2Bnews%40gmail.com" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/validate/email?email=Jane.Doe%2Bnews%40gmail.com", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/validate/email?email=Jane.Doe%2Bnews%40gmail.com", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"input": "Jane.Doe+news@gmail.com",
"valid": true,
"reason": null,
"local": "Jane.Doe+news",
"domain": "gmail.com",
"tag": "news",
"normalized": "janedoe@gmail.com",
"disposable": false,
"role_based": false,
"mx": {
"found": true,
"records": [
{
"preference": 5,
"exchange": "gmail-smtp-in.l.google.com"
}
]
}
}