Network & DNS
/api/v1/dns-lookupPacketFlo DNS Lookup API
A, AAAA, MX, TXT, CNAME, NS, and SOA records.
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain to resolve. |
resolver | string | No | Which resolver to query — an ip from the DNS Propagation Checker's named list (8.8.8.8 Google, 1.1.1.1 Cloudflare, 9.9.9.9 Quad9, 208.67.222.222 OpenDNS, 64.6.64.6 Verisign, 94.140.14.14 AdGuard, 223.5.5.5 Alibaba, 4.2.2.1 Level3), or "system" for this server's own default resolver. Omitted or unrecognized defaults to "system". |
Specific Public Resolver (Cloudflare 1.1.1.1)
Queries Cloudflare public DNS specifically to inspect records cached or seen by that resolver.
Example request
curl "https://packetflo.io/api/v1/dns-lookup?domain=example.com&resolver=1.1.1.1&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "domain": "example.com", "records": { "A": ["104.16.132.229", "104.16.133.229"], "AAAA": ["2606:4700::6810:85e5"], "MX": [{ "exchange": "mx1.example.com", "priority": 10, "type": "MX" }], "TXT": ["v=spf1 include:_spf.example.com -all"], "CNAME": [], "NS": ["ns1.example.com", "ns2.example.com"], "SOA": [{ "nsname": "ns1.example.com", "hostmaster": "dns.example.com", "serial": 2414136692, "refresh": 10000, "retry": 2400, "expire": 604800, "minttl": 300 }] }, "resolver": { "name": "Cloudflare", "ip": "1.1.1.1" } }, "meta": { "tool": "dns-lookup", "version": "v1" } }
Default System Resolver
Queries the server's default upstream resolver when resolver parameter is omitted.
Example request
curl "https://packetflo.io/api/v1/dns-lookup?domain=example.com&api_key=YOUR_API_KEY"
Example response
{ "ok": true, "data": { "domain": "example.com", "records": { "A": ["172.66.147.243", "104.20.23.154"], "AAAA": ["2606:4700:83b5:72db:f2c5:0:ef6b:ff98"], "MX": [], "TXT": ["v=spf1 -all"], "CNAME": [], "NS": ["hera.ns.cloudflare.com", "elliott.ns.cloudflare.com"], "SOA": [{ "nsname": "elliott.ns.cloudflare.com", "hostmaster": "dns.cloudflare.com", "serial": 2416374680, "refresh": 10000, "retry": 2400, "expire": 604800, "minttl": 1800 }] }, "resolver": null }, "meta": { "tool": "dns-lookup", "version": "v1" } }
Reading the result
Returns DNS records grouped by type. An empty array can mean no records were found or that the lookup for that type failed.
Response fields
| Field | What it tells you |
|---|---|
domain / resolver | The queried domain and resolver label. Unsupported resolver selections fall back to the system resolver. |
records | Groups A, AAAA, MX, TXT, CNAME, NS and SOA results. |
records.MX | Mail exchanges sorted by ascending priority; lower values are preferred. |
records.TXT / records.SOA | TXT chunks are joined into strings. SOA results are returned in an array. |
Scope and limits
Queries record types concurrently from the chosen resolver. Results reflect that resolver's view and cache, not worldwide DNS propagation. Individual lookup errors are returned as empty arrays.
Authentication and errors
Send your key in the x-api-key header, or the supported api_key query parameter. Each request uses 1 credit 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. |