# DNS MX Record Lookup

> DNS MX Record Lookup is a paid API for AI agents from dns.use.x402atlas.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Looks up DNS MX (mail exchange) records for a hostname, returning mail server hosts and their priorities as structured JSON.

## Facts

- Endpoint: GET https://dns.use.x402atlas.com/mx
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dns-mx-record-lookup-96b39a5d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l1HEptjUXdkM-Lj0ywPtp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability dns-mx-record-lookup-96b39a5d
```

Example prompt: What are the MX records for gmail.com? I want to see which mail servers handle its email and what their priorities are.

## When to prefer this

Use this endpoint when you need to verify email routing configuration, check which mail provider handles a domain, validate email deliverability setup, or inspect MX record priorities for a specific hostname. Prefer this over general DNS tools when you specifically need MX (mail exchange) data in a structured, agent-consumable JSON format via a simple GET request.

## Known failure modes

- Domain has no MX records — returns empty list or appropriate status
- Invalid or malformed hostname — returns error response
- Domain does not exist (NXDOMAIN) — returns error or empty result
- Network or upstream DNS resolver failure — returns error
- Payment not included or insufficient — returns 402 Payment Required

## How this service works

DNS MX record lookup — a domain's mail servers with their hostnames and priorities as structured JSON, for email routing, deliverability diagnostics and mail-provider detection.

## Output

A structured JSON object listing MX records for the queried hostname, each entry containing the mail server hostname and its numeric priority value used for email routing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "host"
     ],
     "properties": {
      "host": {
       "type": "string",
       "maxLength": 253,
       "minLength": 1,
       "description": "Bare hostname to resolve (not an IP literal, not localhost, not under a reserved suffix like .local/.internal)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "host",
      "records",
      "queried_at"
     ],
     "properties": {
      "host": {
       "type": "string",
       "description": "The queried hostname"
      },
      "records": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "host",
         "pref"
        ],
        "properties": {
         "host": {
          "type": "string",
          "description": "Mail server hostname, typically with a trailing dot"
         },
         "pref": {
          "type": "integer",
          "description": "MX preference; lower values are tried first"
         }
        }
       }
      },
      "queried_at": {
       "type": "string",
       "format": "date-time",
       "description": "UTC timestamp of the lookup"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "host": "example.com",
  "records": [
   {
    "host": "mail.example.com.",
    "pref": 10
   }
  ],
  "queried_at": "2026-06-05T12:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dns-mx-record-lookup-96b39a5d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dns.use.x402atlas.com](https://www.zero.xyz/host/dns.use.x402atlas.com/llms.txt)
