# MX Records: Mail Servers

The MX records of gmail.com: its mail servers with their priorities, lowest (preferred) first.

Source: https://docs.deepinfo.com/reference/lookup/dns/examples/type-mx/

Last updated: 2026-09-24

---
`GET https://api.deepinfo.com/v1/lookup/dns?domain=gmail.com&type=MX`

The MX records of gmail.com: its mail servers with their priorities, lowest (preferred) first.

Example 3 of 13 in **Record Types** · [DNS Lookup Examples](/reference/lookup/dns/examples/) · endpoint: [DNS](/reference/lookup/dns/)

Tags: `param` `domain` · `param` `type` · `value` `gmail.com` · `value` `MX`

Asks for the `MX` records of `gmail.com`.

Each value is a priority followed by a mail server: `5 gmail-smtp-in.l.google.com` is tried first, the four `altN` servers (priorities 10 to 40) after it. `values` lists them by priority; `raw` keeps the order the resolver returned them in.

## Request

| Parameter | In | Value |
|---|---|---|
| `domain` | query | `gmail.com` |
| `type` | query | `MX` |

```bash
curl 'https://api.deepinfo.com/v1/lookup/dns?domain=gmail.com&type=MX' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Accept: application/json'
```

## Response

### 200 · OK

`Content-Type: application/json` · `ratelimit-limit: 100000` · `ratelimit-remaining: 99997` · `ratelimit-reset: 41` · `x-ratelimit-limit-minute: 100000` · `x-ratelimit-remaining-minute: 99997` · `deepinfo-request-id: 5f0c6a8e-1b2d-4c3e-9f4a-7b8c9d0e1f2a`

```json
{
  "fqdn": "gmail.com",
  "requested_types": [
    "MX"
  ],
  "responses": [
    {
      "type": "MX",
      "conn_status": "success",
      "rcode": "NOERROR",
      "raw": "gmail.com. 673 IN MX 10 alt1.gmail-smtp-in.l.google.com.\ngmail.com. 673 IN MX 30 alt3.gmail-smtp-in.l.google.com.\ngmail.com. 673 IN MX 40 alt4.gmail-smtp-in.l.google.com.\ngmail.com. 673 IN MX 20 alt2.gmail-smtp-in.l.google.com.\ngmail.com. 673 IN MX 5 gmail-smtp-in.l.google.com.",
      "values": [
        "5 gmail-smtp-in.l.google.com",
        "10 alt1.gmail-smtp-in.l.google.com",
        "20 alt2.gmail-smtp-in.l.google.com",
        "30 alt3.gmail-smtp-in.l.google.com",
        "40 alt4.gmail-smtp-in.l.google.com"
      ],
      "server": "8.8.8.8"
    }
  ],
  "servers": [
    "8.8.8.8"
  ],
  "check_date": "2026-09-24T07:48:19Z"
}
```

## Related Examples

- [Null MX: A Domain That Accepts No Mail](/reference/lookup/dns/examples/null-mx/)
- [AAAA Records: IPv6 Addresses](/reference/lookup/dns/examples/type-aaaa/)
- [NS Records: Name Servers](/reference/lookup/dns/examples/type-ns/)
- [A Records of a Domain](/reference/lookup/dns/examples/type-a/)
- [TXT Records](/reference/lookup/dns/examples/type-txt/)
- [CNAME Record of a Host Name](/reference/lookup/dns/examples/type-cname/)
