WhereIsDNS API
WhereIsDNS exposes a single public endpoint that returns DNS lookup results from 12 public resolvers as a Server-Sent Events (SSE) stream. It's the same endpoint the website itself uses. No signup, no auth.
GET /api/lookup
Query parameters:
host— the fully-qualified domain name to look up (e.g.,example.com). Required.type— DNS record type. One ofA,AAAA,CNAME,MX,NS,TXT,SOA,CAA,PTR. Defaults toA.
Response: text/event-stream. One data: event per resolver as
each settles, then a final {"done": true, "consensus": {...}} event when
all 12 finish (or time out at 5 s).
Example
Request:
curl -N "https://whereisdns.com/api/lookup?host=example.com&type=A"
Stream (one event per line, abridged):
data: {"resolver":"Cloudflare","location":"Global","status":"ok","records":["104.20.23.154","172.66.147.243"],"latencyMs":42}
data: {"resolver":"Google","location":"USA","status":"ok","records":["104.20.23.154","172.66.147.243"],"latencyMs":58}
...
data: {"resolver":"Quad9","location":"Switzerland","status":"timeout"}
data: {"done":true,"consensus":{"104.20.23.154, 172.66.147.243":11,"NXDOMAIN":0}}
Per-event fields
resolver— operator name (Cloudflare, Google, Quad9, …)location— operator's nominal jurisdictionstatus—"ok","nxdomain","timeout", or"error"records— array of strings (only whenstatus === "ok")latencyMs— round-trip ms for ok/nxdomain resultsmessage— error description (only whenstatus === "error")
Final event
done: true— signals end of streamconsensus— object mapping each unique result string (sorted, comma-separated for multi-record results) to a count of resolvers reporting that result.NXDOMAINcounted separately.
Rate limits
No published rate limit at the moment. Reasonable use is fine; abusive automation will be blocked. If you need higher volume or guaranteed throughput, please open an issue.
Other endpoints
GET /api/health— returnsok(200). Use for uptime probes.
Source
The full implementation is on
GitHub.
It's a Cloudflare Worker fanning out DNS-over-HTTPS queries; the wire-format
codec and resolver list live in worker/.