MX Lookup API

GET

See which mail servers receive email for any domain.

MX Lookup queries DNS to find MX records for any domain. It returns an array of mail exchange hostnames and their priority routing values in real time.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/mxlookup?domain=yahoo.com
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "domain": "yahoo.com",
    "mx": [
      {
        "priority": 1,
        "exchange": "mta7.am0.yahoodns.net"
      },
      {
        "priority": 1,
        "exchange": "mta6.am0.yahoodns.net"
      },
      {
        "priority": 1,
        "exchange": "mta5.am0.yahoodns.net"
      }
    ]
  }
}

About the MX Lookup API

Pass any domain name to run a live DNS lookup for its mail configuration. The response returns the queried domain and an array of MX entries, showing each mail exchange server hostname paired with its priority routing integer.

What people use it for

Signup Email Validation
To stop fake signups, authentication workflows check MX records to confirm the registrant's email domain can actually accept incoming messages.
Domain Migration Auditing
DevOps engineers track exchange hostnames and priority numbers before and after DNS changes to verify mail traffic directs to new servers.
Cold Outreach Deliverability
Sales outreach software verifies that recipient domains have active mail servers before scheduling outbound campaign sequences to protect sender reputation.
Mail Provider Detection
Identify whether a prospect uses Google Workspace, Microsoft 365, or self-hosted infrastructure by parsing the returned exchange server hostnames.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

How it compares

Side by side with the tools people weigh MX Lookup against — what each one is better at, in plain terms.

Other ways to use MX Lookup

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the MX Lookup API.

Read the docs →
What mail server details does the API return for each record?
Each record in the response provides the mail exchange server hostname and its priority value. The priority number indicates routing preference for incoming messages, while the exchange host identifies the server accepting email for that domain.
How fresh are the returned MX records?
Records are checked in real time. MX Lookup queries data live when you send a request, giving you the domain's current mail routing configuration rather than stale cached values.
What would 5,000 domain lookups a month cost me?
That volume fits comfortably within the Starter plan, which covers up to 20,000 lookups each month. Each lookup costs 10 credits, which works out to $0.0015 per call or $1.50 per 1,000 calls. 5,000 lookups would use 50,000 credits. For testing, the Free plan includes 20 lookups per month.
Can I use the MX data in my own commercial application?
Yes, commercial use is allowed on any paid plan. You can display or process the mail server data inside your own applications, verification tools, or internal workflows. You may not resell or redistribute the raw lookup data as a standalone service.
What input format does the lookup require?
You only need to supply the target domain name as a text string, such as yahoo.com. The API then returns the full list of mail exchangers configured for that domain.

Ready to build with MX Lookup? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs