Free DNS Lookup API — Resolve, WHOIS & Domain Availability
Need to resolve DNS records, check domain availability, or run WHOIS lookups from your code? The Agent DNS Lookup API gives you programmatic access to DNS resolution, reverse lookups, RDAP/WHOIS data, domain availability checks, and propagation monitoring — all through a clean REST interface with no account required.
This guide covers every endpoint: A/AAAA/MX/TXT/CNAME resolution, reverse DNS, WHOIS, domain availability, propagation across 8 global resolvers, and batch lookups for up to 50 domains at once.
All Record Types
A, AAAA, MX, TXT, CNAME, NS, SOA, SRV, CAA, PTR — any DNS record type you need.
WHOIS / RDAP
Registrar, nameservers, creation/expiry dates, DNSSEC status. Real-time RDAP queries.
Domain Availability
Check if a domain is registered or available for purchase. Instant response.
Propagation Check
Query 8 global DNS resolvers (Google, Cloudflare, Quad9, OpenDNS, etc.) to verify DNS propagation.
Quick Start — Resolve a Domain
# Resolve A + AAAA records
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/resolve/google.com
{
"domain": "google.com",
"ipv4": ["142.251.116.139", "142.251.116.101", "142.251.116.113"],
"ipv6": ["2607:f8b0:4023:1009::64", "2607:f8b0:4023:1009::8b"],
"queryTime": 8,
"timestamp": "2026-03-03T20:22:00.123Z"
}
import requests
BASE = "https://agent-gateway-kappa.vercel.app/v1/agent-dns"
# Resolve A + AAAA records
resp = requests.get(f"{BASE}/api/resolve/google.com")
data = resp.json()
for ip in data["ipv4"]:
print(f"IPv4: {ip}")
for ip in data["ipv6"]:
print(f"IPv6: {ip}")
const BASE = "https://agent-gateway-kappa.vercel.app/v1/agent-dns";
const resp = await fetch(`${BASE}/api/resolve/google.com`);
const data = await resp.json();
console.log("IPv4:", data.ipv4);
console.log("IPv6:", data.ipv6);
console.log("Query time:", data.queryTime, "ms");
No API key needed for basic lookups. The free tier gives you generous rate limits out of the box.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/resolve/:domain | Resolve A + AAAA records for a domain |
| GET | /api/resolve/:domain/:type | Resolve specific record type (MX, TXT, CNAME, NS, SOA, SRV, CAA) |
| GET | /api/reverse/:ip | Reverse DNS lookup (IP to hostname) |
| GET | /api/all/:domain | Get all DNS record types for a domain at once |
| GET | /api/whois/:domain | RDAP/WHOIS lookup (registrar, dates, nameservers, DNSSEC) |
| GET | /api/check/:domain | Check domain availability (registered vs available) |
| GET | /api/propagation/:domain | DNS propagation across 8 global resolvers |
| POST | /api/batch | Batch resolve up to 50 domains in one request |
Look Up Specific Record Types
Query any DNS record type by appending it to the resolve endpoint:
MX Records (Mail Servers)
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/resolve/google.com/MX
{
"domain": "google.com",
"type": "MX",
"records": [
{"exchange": "smtp.google.com", "priority": 10}
],
"queryTime": 11
}
TXT Records (SPF, DKIM, verification)
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/resolve/github.com/TXT
{
"domain": "github.com",
"type": "TXT",
"records": [
"v=spf1 ip4:192.30.252.0/22 include:_netblocks.google.com ...",
"MS=ms58704441",
"docusign=...",
"atlassian-domain-verification=..."
]
}
NS Records (Nameservers)
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/resolve/cloudflare.com/NS
{
"domain": "cloudflare.com",
"type": "NS",
"records": ["ns3.cloudflare.com", "ns4.cloudflare.com", "ns5.cloudflare.com", "ns6.cloudflare.com", "ns7.cloudflare.com"]
}
Reverse DNS Lookup
Convert an IP address back to its hostname:
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/reverse/8.8.8.8
{
"ip": "8.8.8.8",
"hostnames": ["dns.google"],
"queryTime": 2
}
WHOIS / RDAP Lookup
Get registration details for any domain — registrar, creation date, expiration, nameservers, and DNSSEC status:
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/whois/example.com
{
"domain": "example.com",
"registered": true,
"registrar": "RESERVED-Internet Assigned Numbers Authority",
"nameservers": ["ELLIOTT.NS.CLOUDFLARE.COM", "HERA.NS.CLOUDFLARE.COM"],
"status": ["client delete prohibited", "client transfer prohibited"],
"created": "1995-08-14T04:00:00Z",
"updated": "2026-01-16T18:26:50Z",
"expires": "2026-08-13T04:00:00Z",
"dnssec": true
}
Domain Availability Check
Check whether a domain is registered or available for purchase:
# Check if a domain is available
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/check/my-cool-startup.com
{
"domain": "my-cool-startup.com",
"available": true,
"registered": false,
"hasRecords": false,
"ips": [],
"registrar": null,
"expires": null,
"queryTime": 208
}
The availability check combines DNS resolution with RDAP queries. If a domain has no DNS records and no RDAP registration, it's marked as available.
DNS Propagation Check
After making DNS changes, verify propagation across 8 global resolvers:
curl https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/propagation/example.com
{
"domain": "example.com",
"results": [
{"resolver": "8.8.8.8", "name": "Google", "ips": ["93.184.216.34"], "queryTime": 5},
{"resolver": "1.1.1.1", "name": "Cloudflare", "ips": ["93.184.216.34"], "queryTime": 3},
{"resolver": "9.9.9.9", "name": "Quad9", "ips": ["93.184.216.34"], "queryTime": 8},
{"resolver": "208.67.222.222", "name": "OpenDNS", "ips": ["93.184.216.34"], "queryTime": 12},
{"resolver": "185.228.168.9", "name": "CleanBrowsing", "ips": ["93.184.216.34"], "queryTime": 15}
],
"consistent": true,
"totalResolvers": 8
}
The consistent field tells you whether all resolvers agree on the same answer — useful after updating A records, switching nameservers, or migrating hosting.
Batch DNS Resolution
Resolve up to 50 domains in a single request:
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-dns/api/batch \
-H "Content-Type: application/json" \
-d '{
"domains": ["google.com", "github.com", "cloudflare.com"],
"type": "A"
}'
{
"results": [
{"domain": "google.com", "records": ["142.251.116.139", "142.251.116.101"]},
{"domain": "github.com", "records": ["140.82.121.4"]},
{"domain": "cloudflare.com", "records": ["104.16.132.229", "104.16.133.229"]}
],
"total": 3,
"queryTime": 24
}
Real-World Use Cases
Domain Monitoring
Monitor DNS changes, detect hijacking, track nameserver migrations, and alert on expiring domains via WHOIS.
DevOps & Infrastructure
Verify DNS propagation after deployments, validate MX records for email deliverability, audit SPF/DKIM/DMARC records.
Domain Research & Registration
Bulk-check domain availability for naming projects. Get WHOIS data to find expiring domains for acquisition.
Security & Threat Intel
Reverse-lookup suspicious IPs, check domain age for phishing detection, validate certificate configurations.
Comparison: Free DNS API vs Alternatives
| Feature | Agent DNS | Google DNS-over-HTTPS | SecurityTrails | WhoisXML API |
|---|---|---|---|---|
| DNS resolution | All types | All types | All types | All types |
| WHOIS / RDAP | Yes | No | Yes (paid) | Yes (paid) |
| Domain availability | Yes | No | No | Yes (paid) |
| Propagation check | 8 resolvers | No | No | No |
| Reverse DNS | Yes | Yes | Yes | Yes |
| Batch lookups | 50 domains | No | Paid only | Paid only |
| Signup required | No | No | Yes | Yes |
| Free tier | Generous | Unlimited | 50 queries/mo | 500 queries/mo |
Key advantage: Agent DNS combines DNS resolution, WHOIS, availability checks, and propagation monitoring in a single API — most alternatives only offer one or two of these features, and lock the rest behind paid plans.
FAQ
Do I need an API key for DNS lookups?
Basic DNS lookups work without an API key. For higher rate limits, batch queries, and delivery logs, create a free API key via the /api/keys/create endpoint.
Which DNS record types are supported?
A, AAAA, MX, TXT, CNAME, NS, SOA, SRV, CAA, and PTR (via reverse lookup). Use the /api/all/:domain endpoint to fetch all record types at once.
How accurate is the domain availability check?
The check combines DNS resolution with RDAP/WHOIS queries. If a domain has no DNS records and no RDAP registration data, it's marked as available. This is highly accurate for common TLDs (.com, .net, .org, .io) but some newer TLDs may have limited RDAP coverage.
Which resolvers are used for propagation checks?
8 major public resolvers: Google (8.8.8.8), Cloudflare (1.1.1.1), Quad9 (9.9.9.9), OpenDNS (208.67.222.222), CleanBrowsing (185.228.168.9), Comodo (8.26.56.26), and two others. Results include per-resolver response times.
Is this a replacement for dig or nslookup?
Yes, for programmatic use. Instead of parsing CLI output from dig or nslookup, you get structured JSON responses that are easy to process in any language. It's especially useful in serverless environments, CI/CD pipelines, or when building tools that need DNS data.
Does the WHOIS endpoint support all TLDs?
The WHOIS endpoint uses RDAP (Registration Data Access Protocol), the modern replacement for traditional WHOIS. It supports most gTLDs and many ccTLDs. Some older or country-specific TLDs may have limited data available.
Try a DNS Lookup Right Now
No signup, no API key needed. Just send a GET request and get structured DNS data back instantly.
Getting Started Guide