DNS RobotDNS Propagation Checker
HomeDNS LookupWHOIS LookupIP LookupSSL Check
DNS RobotDNS Propagation Checker

Next-generation DNS propagation toolkit

Privacy PolicyTerms of ServiceAbout UsBlogContact

DNS Tools

DNS LookupDNS Speed TestDomain to IPNS LookupMX LookupView all

Email Tools

SPF Record CheckerDMARC CheckerDKIM CheckerSMTP Test ToolEmail Header AnalyzerView all

Website Tools

WHOIS LookupHosting CheckerDomain AvailabilitySubdomain FinderCMS DetectorView all

Network Tools

Ping ToolTraceroutePort CheckerHTTP Headers CheckSSL Certificate CheckView all

IP Tools

IP LookupWhat Is My IPIP Blacklist CheckIP to HostnameASN LookupView all

Utility Tools

QR Code ScannerQR Code GeneratorUPI QR Code GeneratorWiFi QR Code GeneratorMorse Code TranslatorView all
© 2026 DNS Robot. Developed by ❤ Shaik Brothers
All systems operational
Made with
Home / DNS Lookup API

Free DNS Lookup API

Query A, AAAA, CNAME, MX, NS, TXT, SOA, PTR, SRV, CAA, DNSKEY and DS records through any public resolver with one JSON request. It's the same API that powers DNS Robot's DNS Lookup and DNS propagation checker.

No API keyCORS enabled12 record typesJSON

No signup

No key, no account. Send a POST request and read JSON.

Any public resolver

Ask Google, Cloudflare, Quad9 or any public DNS server by IP.

DNSSEC records

DNSKEY and DS records come from Cloudflare's DNS-over-HTTPS resolver.

Quick start

Look up the A records of example.com through Cloudflare's resolver:

Request
curl -X POST https://dnsrobot.net/api/dns-query \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com","recordType":"A","dnsServer":"1.1.1.1"}'
Response · 200 OK
{
  "status": "success",
  "responseTime": 4,
  "resolvedIPs": ["172.66.147.243", "104.20.23.154"],
  "dnsServer": "1.1.1.1",
  "recordType": "A",
  "domain": "example.com",
  "method": "dns-node",
  "debug": "Found 2 records"
}

Endpoint

POST https://dnsrobot.net/api/dns-query
Content-Type: application/json

Request body fields:

FieldTypeRequiredDescription
domainstringYesDomain to query (max 253 characters). Underscore names such as _dmarc.example.com and _sip._tcp.example.com are accepted. For PTR, pass an IPv4 or full IPv6 address.
recordTypestringYesOne of A, AAAA, CNAME, MX, NS, TXT, SOA, PTR, SRV, CAA, DNSKEY, DS.
dnsServerstringYesIPv4 address of the public resolver to ask, e.g. 8.8.8.8. Private, loopback and reserved addresses are rejected.
timeoutnumberNoMilliseconds to wait for the resolver, 1000–10000. Default 5000.

Response

FieldMeaning
status"success" when the resolver answered (with or without records), "error" when the lookup failed.
resolvedIPsArray of record values as strings (see the formats below). Empty when no records of that type exist.
responseTimeTime the lookup took, in milliseconds.
errorMessagePresent when status is "error", e.g. NXDOMAIN - Domain does not exist, DNS server timeout, DNS server failure.
dnsServer · recordType · domainEcho of the request, with recordType upper-cased.
debugShort human-readable summary such as "Found 2 records".

No records of the requested type is a normal answer, not an error: you get status: "success" with an empty array.

No records · 200 OK
{
  "status": "success",
  "resolvedIPs": [],
  "recordType": "DNSKEY",
  "domain": "spidyhost.com",
  "debug": "No records of this type exist for this domain",
  ...
}

DNS failures also return HTTP 200, with status: "error" and an errorMessage:

DNS error · 200 OK
{
  "status": "error",
  "responseTime": 7,
  "resolvedIPs": [],
  "errorMessage": "NXDOMAIN - Domain does not exist",
  "dnsServer": "8.8.8.8",
  "recordType": "A",
  "domain": "no-such-domain-dnsrobot-test.com",
  "method": "dns-node"
}

Record types and value formats

TypeEach value containsExample
AIPv4 address172.66.147.243
AAAAIPv6 address2001:db8::1
CNAMETarget hostnameexample.com.cdn.cloudflare.net
MXpriority exchange10 alt1.gmail-smtp-in.l.google.com
NSNameserver hostnamens1.example.net
TXTFull text (long records joined)v=spf1 include:_spf.google.com ~all
SOASeven labelled stringsPrimary NS: …, Hostmaster: …, Serial: …, Refresh/Retry/Expire/Min TTL
PTRHostname for an IPdns.google
SRVpriority weight port target10 60 5060 sip.example.com
CAAflags tag "value"0 issue "letsencrypt.org"
DNSKEYflags protocol algorithm key256 3 13 oJMRESz5E4gYzS/q6XDrvU1q…
DSkey-tag algorithm digest-type digest2371 13 2 32996839a6d8…

DNSKEY and DS are always fetched through Cloudflare's DNS-over-HTTPS service, so the dnsServerfield doesn't change their answer. A domain without DNSSEC returns an empty array for both.

HTTP status codes

StatusWhen
200The lookup ran. Check status: "success" (records or none) or "error" (NXDOMAIN, timeout, SERVFAIL…).
400Invalid input: bad domain, unknown record type, malformed or non-public dnsServer, timeout out of range.
429Rate limit reached. Wait for the number of seconds in the Retry-After header.
Error bodies
HTTP/1.1 400 Bad Request
{ "error": "Invalid input parameters", "details": "Invalid domain, SRV record, or IP address format" }

HTTP/1.1 429 Too Many Requests
Retry-After: 120
{ "error": "Rate limit exceeded", "details": "Max 600 requests per 10 minutes per IP. Retry after 120s." }

Limits and fair use

600 requests / 10 min

Per client IP, sliding window. Plenty for scripts, CI checks and dashboards.

1–10 s timeout

Set per request with timeout. The default is 5 seconds.

Public resolvers only

dnsServer must be a public IPv4 address. Private and reserved ranges are rejected.

The API is free and provided as is, without an uptime guarantee. Cache results where you can, back off when you receive a 429, and if you use it in a public project, a link to dnsrobot.net is appreciated. Use is subject to the terms of service.

Code examples

JavaScript (browser or Node 18+)
const res = await fetch("https://dnsrobot.net/api/dns-query", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ domain: "gmail.com", recordType: "MX", dnsServer: "8.8.8.8" }),
})
const data = await res.json()
if (res.ok && data.status === "success") {
  console.log(data.resolvedIPs) // ["5 gmail-smtp-in.l.google.com", ...]
} else {
  console.error(data.errorMessage ?? data.details)
}
Python (requests)
import requests

r = requests.post(
    "https://dnsrobot.net/api/dns-query",
    json={"domain": "example.com", "recordType": "TXT", "dnsServer": "9.9.9.9"},
    timeout=15,
)
data = r.json()
if r.ok and data["status"] == "success":
    for record in data["resolvedIPs"]:
        print(record)
else:
    print("Error:", data.get("errorMessage") or data.get("details"))
Shell: compare resolvers
# Compare one record across several public resolvers (a mini propagation check)
for ns in 8.8.8.8 1.1.1.1 9.9.9.9 208.67.222.222; do
  curl -s -X POST https://dnsrobot.net/api/dns-query -H "Content-Type: application/json" \
    -d "{\"domain\":\"example.com\",\"recordType\":\"A\",\"dnsServer\":\"$ns\"}" \
    | jq -c '{dnsServer, resolvedIPs}'
done

Public resolvers you can use

dnsServerProvider
8.8.8.8Google Public DNS
1.1.1.1Cloudflare
9.9.9.9Quad9
208.67.222.222OpenDNS (Cisco)
94.140.14.14AdGuard DNS

Not sure which one to pick? The DNS Speed Test measures which resolver is fastest from your location, and the MX Lookup and SPF Checker tools build on the same lookups with extra analysis.