DNS Records API — Resolve Any Domain in Milliseconds
Retrieve A, AAAA, MX, TXT, CNAME, NS, SOA, and PTR records for any domain through a single API call. Structured JSON or XML, authenticated with the same token as all WhoisJSON services.
Try the DNS Lookup API
Enter any domain to retrieve its full DNS record set in real time.
Every DNS Record Type in One Call
A single request to our NSLookup endpoint returns all available record types for the queried domain. No need for separate calls per record type.
Address Records
IPv4 and IPv6 addresses that a domain resolves to. The foundation of web hosting and service routing.
Mail Exchange
Mail server routing with priority values. Essential for email delivery verification and configuration audits.
Text Records
SPF, DKIM, DMARC, domain verification tokens, and custom key-value data used for security and ownership proofs.
Canonical Names
Domain aliases that point to another domain name. Used for CDNs, subdomains, and service delegation.
Nameservers
Authoritative DNS servers for a domain. Critical for understanding delegation and DNS infrastructure.
Start of Authority
Primary nameserver, admin contact, serial number, and TTL timers. The master record for a DNS zone.
Reverse DNS
Map IP addresses back to domain names. Used for email authentication and network diagnostics.
Service Records
Locate services like SIP, XMPP, and LDAP on specific ports and protocols for a domain.
What Developers Build with DNS Data
Email Configuration Verification
Validate MX records, SPF and DKIM TXT records, and DMARC policies programmatically. Ensure email deliverability before sending campaigns or onboarding new domains.
Security Monitoring & Threat Detection
Detect unauthorized DNS changes, identify DNS hijacking, and monitor nameserver modifications. Pair with our Domain Monitoring for continuous tracking and alerts.
DevOps & DNS Propagation Checks
Verify DNS propagation after deploying changes. Automate checks in your CI/CD pipeline to confirm that A records, CNAME aliases, and TXT verifications are live. Combine with SSL validation for full deployment verification.
Domain Research & Competitive Intelligence
Analyze hosting infrastructure, CDN usage, and email providers of any domain. Cross-reference DNS data with WHOIS registration details and availability status for complete domain intelligence.
One Endpoint, All Record Types
A single GET request returns every DNS record available for a domain. Same API key and authentication as all WhoisJSON endpoints.
Authentication: Authorization: TOKEN=YOUR_API_KEY
Response: JSON (default) or XML with format=xml
{
"data": {
"A": ["142.250.185.14"],
"AAAA": ["2a00:1450:4007:80e::200e"],
"MX": [
{ "priority": 10, "exchange": "smtp.google.com" }
],
"NS": [
"ns1.google.com",
"ns2.google.com"
],
"TXT": [
"v=spf1 include:_spf.google.com ~all",
"google-site-verification=..."
],
"SOA": {
"nsname": "ns1.google.com",
"hostmaster": "dns-admin.google.com",
"serial": 123456789
}
}
}
What Is a DNS Lookup API?
A DNS lookup API allows developers to query the Domain Name System programmatically. Instead of running command-line tools like nslookup or dig, you send an HTTP request and receive structured data in return. WhoisJSON's NSLookup API resolves all major record types — A, AAAA, MX, TXT, CNAME, NS, SOA, and PTR — in a single call, returning clean JSON or XML that's ready for parsing, storage, and analysis. Average response time is under 200 milliseconds.
Part of the WhoisJSON Unified Platform
The DNS Lookup API is one of six endpoints available with every WhoisJSON account. The same API token also gives you access to WHOIS domain registration data, SSL certificate validation, real-time domain availability checks, subdomain discovery, and automated domain monitoring with alerts. No extra sign-ups, no extra keys — one token, six tools. Whether you are building an email verification system, a security scanner, or a domain management dashboard, all the data you need is accessible through a single, consistent API.
From Prototyping to Production
Every new account includes 1,000 free requests per month shared across all endpoints — enough for prototyping and small applications. Our paid plans scale to unlimited requests at up to 300 req/min with a 99.9% uptime SLA. Responses are cached for 3 hours by default; add force=1 to any request to bypass the cache. For common questions, check our FAQ or browse the full API documentation.
Start Resolving DNS Records Today
Create your free account and query DNS data for any domain in seconds.