# DNS Lookup API

> A, AAAA, MX, TXT, NS, CNAME, SOA, CAA and SRV records with DNSSEC status.

Resolves the record types you ask for, or a default set, and reports whether the zone publishes DS records and whether the resolver validated the answer.

- **Endpoint:** `GET https://api.zactonz.com/domain/dns/`
- **Category:** Domain
- **Version:** 1
- **Status:** stable
- **Authentication:** `Authorization: Bearer YOUR_API_KEY`
- **Reference page:** https://developers.zactonz.com/apis/domain-dns/

## Parameters

Send parameters in the query string.

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `name` | string | yes |  | Host or domain name. |
| `type` | string | no | `ALL` | Comma-separated record types, or `ALL` for A, AAAA, MX, TXT, NS, CNAME, SOA and CAA. |

## Example request

```bash
curl "https://api.zactonz.com/domain/dns/?name=zactonz.com&type=A%2CMX%2CTXT" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response

OK

| Field | Type | Description |
|---|---|---|
| `status` | integer | `200` on success. |
| `data` | object | The result. |
| `data.name` | string | Name queried. |
| `data.records` | object | One list per type. A and AAAA carry `address`; MX `priority` and `exchange`; TXT `text`; CNAME, NS and PTR `target`; SOA the zone fields; CAA `flags`, `tag`, `value`; SRV `priority`, `weight`, `port`, `target`. Every record has `name` and `ttl`. |
| `data.dnssec` | object | `ds_records` and `validated_by_resolver`. |
| `data.queried_at` | string | Timestamp. |

```json
{
    "status": 200,
    "data": {
        "name": "zactonz.com",
        "records": {
            "A": [
                {
                    "name": "zactonz.com",
                    "ttl": 300,
                    "address": "67.43.236.62"
                }
            ],
            "MX": [
                {
                    "name": "zactonz.com",
                    "ttl": 300,
                    "priority": 0,
                    "exchange": "mail.zactonz.com"
                }
            ],
            "TXT": [
                {
                    "name": "zactonz.com",
                    "ttl": 300,
                    "text": "v=spf1 +a +mx +ip4:67.43.236.62 ~all"
                }
            ]
        },
        "dnssec": {
            "ds_records": false,
            "validated_by_resolver": false
        },
        "queried_at": "2026-09-17T14:02:11+00:00"
    }
}
```

## Status codes

The outcome is reported in the JSON `status` field. General rules: https://developers.zactonz.com/apis/errors.md

| status | Meaning | Description |
|---|---|---|
| `400` | Bad request | `name` is missing or a record type is not supported. |
| `401` | Unauthorized | The Authorization header is missing or the key is not recognised. |
| `403` | Forbidden | The key is not licensed for this product. |
| `429` | Too many requests | The per-minute rate or the plan quota is exhausted. Retry after the seconds given in `Retry-After`. |

## Notes

Answers are cached for two minutes.
