Network & DNS
/api/v1/dns-tracePacketFlo DNS Trace API
Iterative DNS trace from a root server, through the TLD, to the authoritative nameserver.
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain to trace. |
type | string | No | Record type: A, AAAA, MX, NS, TXT, or CNAME. Defaults to A. |
A Record Trace (Default)
Traces the IPv4 address delegation from root servers down to the authoritative answer.
Example request
curl "https://packetflo.io/api/v1/dns-trace?domain=example.com&type=A&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "domain": "example.com", "type": "A", "method": "iterative", "steps": [ { "hop": 0, "stage": "root", "zone": ".", "server": { "name": "a.root-servers.net", "ip": "198.41.0.4", "source": "root-hints" }, "queryName": "example.com", "queryType": "A", "transport": "udp", "outcome": "referral", "rcode": "NOERROR", "flags": { "aa": false, "tc": false, "ra": false }, "ms": 148, "error": null, "answers": [], "authority": [{ "name": "com", "type": "NS", "ttl": 172800, "data": "l.gtld-servers.net" }], "glueCount": 13, "nextZone": "com", "chosen": true }, { "hop": 1, "stage": "tld", "zone": "com", "server": { "name": "l.gtld-servers.net", "ip": "192.41.162.30", "source": "glue" }, "queryName": "example.com", "queryType": "A", "transport": "udp", "outcome": "referral", "rcode": "NOERROR", "flags": { "aa": false, "tc": false, "ra": false }, "ms": 159, "error": null, "answers": [], "authority": [{ "name": "example.com", "type": "NS", "ttl": 172800, "data": "elliott.ns.cloudflare.com" }], "glueCount": 0, "nextZone": "example.com", "chosen": true }, { "hop": 2, "stage": "authoritative", "zone": "example.com", "server": { "name": "hera.ns.cloudflare.com", "ip": "173.245.58.162", "source": "glue" }, "queryName": "example.com", "queryType": "A", "transport": "udp", "outcome": "answer", "rcode": "NOERROR", "flags": { "aa": true, "tc": false, "ra": false }, "ms": 13, "error": null, "answers": [{ "name": "example.com", "type": "A", "ttl": 300, "data": "104.20.23.154" }], "authority": [], "glueCount": 0, "nextZone": null, "chosen": true } ], "answer": { "status": "answer", "records": [{ "name": "example.com", "type": "A", "ttl": 300, "data": "104.20.23.154" }], "cnameChain": [], "authoritative": true, "zone": "example.com", "server": { "name": "hera.ns.cloudflare.com", "ip": "173.245.58.162" }, "failure": null }, "recursive": { "resolver": "system", "status": "ok", "records": ["104.20.23.154"], "ms": 12, "matchesIterative": true }, "queries": 3, "totalMs": 335, "limitReached": false }, "meta": { "tool": "dns-trace", "version": "v1" } }
MX Record Trace
Traces mail server records iteratively across zones to find authoritative mail exchanges.
Example request
curl "https://packetflo.io/api/v1/dns-trace?domain=example.com&type=MX&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "domain": "example.com", "type": "MX", "method": "iterative", "steps": [ { "hop": 0, "stage": "root", "zone": ".", "server": { "name": "a.root-servers.net", "ip": "198.41.0.4", "source": "root-hints" }, "queryName": "example.com", "queryType": "MX", "transport": "udp", "outcome": "referral", "rcode": "NOERROR", "flags": { "aa": false, "tc": false, "ra": false }, "ms": 145, "error": null, "answers": [], "authority": [{ "name": "com", "type": "NS", "ttl": 172800, "data": "l.gtld-servers.net" }], "glueCount": 13, "nextZone": "com", "chosen": true }, { "hop": 1, "stage": "tld", "zone": "com", "server": { "name": "l.gtld-servers.net", "ip": "192.41.162.30", "source": "glue" }, "queryName": "example.com", "queryType": "MX", "transport": "udp", "outcome": "referral", "rcode": "NOERROR", "flags": { "aa": false, "tc": false, "ra": false }, "ms": 152, "error": null, "answers": [], "authority": [{ "name": "example.com", "type": "NS", "ttl": 172800, "data": "elliott.ns.cloudflare.com" }], "glueCount": 0, "nextZone": "example.com", "chosen": true }, { "hop": 2, "stage": "authoritative", "zone": "example.com", "server": { "name": "hera.ns.cloudflare.com", "ip": "173.245.58.162", "source": "glue" }, "queryName": "example.com", "queryType": "MX", "transport": "udp", "outcome": "answer", "rcode": "NOERROR", "flags": { "aa": true, "tc": false, "ra": false }, "ms": 15, "error": null, "answers": [{ "name": "example.com", "type": "MX", "ttl": 300, "data": "10 mail.example.com" }], "authority": [], "glueCount": 0, "nextZone": null, "chosen": true } ], "answer": { "status": "answer", "records": [{ "name": "example.com", "type": "MX", "ttl": 300, "data": "10 mail.example.com" }], "cnameChain": [], "authoritative": true, "zone": "example.com", "server": { "name": "hera.ns.cloudflare.com", "ip": "173.245.58.162" }, "failure": null }, "recursive": { "resolver": "system", "status": "ok", "records": ["10 mail.example.com"], "ms": 14, "matchesIterative": true }, "queries": 3, "totalMs": 328, "limitReached": false }, "meta": { "tool": "dns-trace", "version": "v1" } }
Reading the result
Read answer.status: answer, nodata, nxdomain or failed. A failed or partial trace can still be a successfully returned diagnostic.
Response fields
| Field | What it tells you |
|---|---|
steps | Ordered attempts with server, zone, transport, outcome, response code, records and elapsed milliseconds. |
answer | Final records, CNAME chain, authoritative flag and failure explanation where applicable. |
recursive | A separate system-resolver comparison, including whether it matches the iterative result. |
queries / totalMs / limitReached | Work performed, total elapsed time and whether a safety limit stopped the trace. |
Scope and limits
Walks delegations with a 14-second budget, at most 24 queries, ten hops per walk, three attempts per hop and three CNAME restarts. Up to 30 records are shown per response. Blocked DNS traffic or authoritative-server failures can leave partial results.
Authentication and errors
Send your key in the x-api-key header, or the supported api_key query parameter. Each request uses 3 credits from the key's shared 300-credit rolling 24-hour budget. Credits are charged before parameter validation. Successful responses and quota errors include usage headers; GET and OPTIONS support CORS.
| API status | Meaning |
|---|---|
200 | The diagnostic returned a result in data, with ok: true and version information in meta. Read the diagnostic fields to determine the target's condition. |
400 | Invalid or blocked input, or a lookup/check failure that could not be returned as a diagnostic result. Read error for details. |
401 | Missing, invalid or revoked API key. |
429 | The request would exceed the key's available credit budget. |