GET /mx/{domain}
MX lookup 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.
Coverage
Live DNS. Hosts refresh when you look them up.
No MX and no mail are different.
The record itself tells you which answer you received.
- host: "mail.example.net"
- A mail exchanger. Lower priority numbers are tried first.
- priority: 0 · host: "."
- An explicit null MX. This domain says it accepts no mail.
- mx: []
- No MX records. Delivery can still fall back to an A or AAAA address.
Mail routing does not establish that an individual mailbox exists. Use email verification for that question.
- 1h
- maximum DNS reuse
- Every plan
- pooled requests
Pass a domain. Hosts come back sorted the way mailers try them, lowest number first. Empty mx means no mail exchanger. That is an answer, not an error.
Lookups refresh when their DNS lifetime expires. Failed refreshes return an error instead of an old answer. Availability lives on /domain/{domain}. This call is mail routing only, on every plan.
SPEED
How long /mx takes.
Median time to first byte over the last seven days. Warm requests, measured every 30 minutes. Live verification and other request variants can take longer.
US
238ms
EU
176ms
APAC
200ms
LatAm
533ms
ME
101ms
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.
Find the mail route.
Mail servers and priority, ready for your app. Every plan.
Start includes 1M API requests a month for $20/mo.