GET /mx/{domain}
MX API
See where a domain routes its mail.
Try it
{
"domain": "gmail.com",
"priority": 5,
"host": "gmail-smtp-in.l.google.com"
},
"priority": 10,
"host": "alt1.gmail-smtp-in.l.google.com"
}
]
}1M requests · $20/mo. Get started
What comes back.
mx
Priority and host. A priority-0 host of . is null MX (accepts no mail); [] means no MX records.
1
Pass a domain
Hosts come back sorted the way mailers try them.
2
Read the distinction
An empty list means no MX. A host of . explicitly means no mail.
3
Fresh on lookup
Records refresh when their DNS lifetime expires.
Make your first request.
One key works across the APIs. Copy a request in your language and get JSON back.
curl "https://api.parseapi.com/mx/gmail.com" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Parse-Version: 2.0.0"// Example response · 200
{
"domain": "gmail.com",
"mx": [
{
"priority": 5,
"host": "gmail-smtp-in.l.google.com"
},
{
"priority": 10,
"host": "alt1.gmail-smtp-in.l.google.com"
},
// ... 3 more
]
}QUESTIONS
- What is a null MX?
- A single record with priority 0 and host ".". The domain explicitly says it accepts no mail. We preserve that record in the mx array.
- Does an empty list mean mail cannot be delivered?
- No. An empty mx array means no MX records were found. SMTP can fall back to the domain A or AAAA address. The email API checks that route; mailbox verification is a separate question.
- What comes back?
- Hosts and priority, sorted the way mailers try them. Empty mx means the domain has no mail exchanger.
- How fresh is it?
- Lookups share the DNS API's freshness rules. Cached answers expire with their DNS lifetime, capped at one hour. Failed refreshes return an error instead of an old answer.
- Does empty MX mean the domain is free?
- No. Empty mx is mail routing only. Availability is GET /domain/{domain}.
- Does an empty list prove the domain rejects mail?
- No. Mail delivery can fall back to an A or AAAA record when MX records are absent. Use /email with deep to check a specific mailbox.
See the mail servers on any domain with the MX lookup.