Skip to content
Gridlode
Docs · Reference

DNS Lookup

GET /v1/domain/dns1 credit / requestcache 5 min

DNS records (A, AAAA, MX, NS, TXT, CNAME, SOA, CAA) resolved through two independent DNS-over-HTTPS networks (Cloudflare and Google) with a consistency check between them.

Query parameters

domain
string · required
Hostname to resolve, e.g. example.com or www.example.com.
types
array
Record types to resolve.
Allowed: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA
max_age
integer
Accept a cached answer up to this many seconds old, billed at 50%.

Response data fields

  • exists · false when both resolvers return NXDOMAIN.
  • records · Map of record type to a list of { value, ttl }. MX, SOA and CAA values are structured objects.
  • resolvers · Which DNS-over-HTTPS networks answered (cloudflare, google).
  • consistent / inconsistent_types · Whether both resolvers returned the same answers, and which types differ.

Example

curl "https://api.gridlode.com/v1/domain/dns?domain=example.com&types=A%2CNS" \
  -H "Authorization: Bearer $GRIDLODE_KEY"

Try it without code on the DNS Lookup API page.