Compare WHOIS and domain lookup APIs side-by-side. Query registrar data, expiration dates, nameservers, and domain ownership programmatically. Find the best WHOIS API for brand protection, security research, and domain monitoring.
A WHOIS query returns structured registration data about a domain. Here are the key fields you get from most WHOIS APIs:
registrarDomain registrar namecreatedDateRegistration dateexpiresDateExpiration dateupdatedDateLast modifiednameserversDNS serversstatusDomain status codesregistrantOwner (often redacted)dnssecDNSSEC statusNote: Since GDPR (2018), registrant contact details (name, email, phone, address) are redacted in most WHOIS records. Paid APIs may provide historical or unredacted data where legally available.
From domain name to structured registration data in milliseconds:
HTTP GET with domain name
API queries WHOIS/RDAP servers
Raw text parsed into JSON
Registrar, dates, nameservers
Why developers integrate WHOIS lookups into their applications:
Monitor for lookalike domains, typosquatting, and phishing sites impersonating your brand. Track new registrations that match your trademarks.
Track expiration dates across your domain portfolio. Set alerts for domains expiring within 30/60/90 days to prevent accidental lapses.
Investigate suspicious domains in phishing campaigns. Check domain age (new domains = higher risk), registrar patterns, and registration velocity.
Research domain history, age, and ownership changes. Find expiring domains worth acquiring. Check if domains have clean registration histories.
Automate domain inventory management. Verify nameserver configurations, SSL certificate ownership, and domain status across environments.
Verify domain ownership for legal proceedings. Document registration history for trademark disputes. ICANN compliance checks.
Side-by-side feature comparison of all 6 WHOIS API providers:
| Provider | Free Tier | API Key | TLD Coverage | Historical Data | Bulk Lookup | RDAP Support | Response Format |
|---|---|---|---|---|---|---|---|
| WhoisXML API Freemium | 500/month | Yes | 7,596+ TLDs | ✓ 25.5B records | ✓ | ✓ | JSON, XML |
| WhoisFreaks Freemium | 500 credits | Yes | 1,528+ TLDs | ✓ 3.6B records | ✓ | ✓ | JSON |
| RDAP Free | Unlimited | No | 1,500+ TLDs | ✗ | ✗ | ✓ Native | JSON (jCard) |
| IP2WHOIS Freemium | 500/month | Yes | 1,000+ TLDs | ✗ | ✗ | ● Partial | JSON |
| API Ninjas Freemium | 50/month | Yes | Common TLDs | ✗ | ✗ | ✗ | JSON |
| Frostbyte DNS Try Free | 200 credits | Yes | All resolvable | ✗ | ✗ | ✗ | JSON |
Detailed analysis of each WHOIS API, with pros, cons, and ideal use cases:
RDAP is the modern replacement for the 40-year-old WHOIS protocol. Here is how they compare:
| Feature | Legacy WHOIS | RDAP (Modern) |
|---|---|---|
| Protocol | TCP port 43 (plaintext) | HTTPS (encrypted) |
| Response Format | Unstructured plain text | Structured JSON |
| Authentication | None (public) | None (public) |
| Internationalization | ASCII only | Full Unicode (IDN support) |
| Contact Data | Often redacted (GDPR) | Redacted by default (GDPR) |
| Linked Data | No | Yes (links to related resources) |
| Standard | RFC 3912 (1985) | RFC 7480-7484 (2015) |
| Status | Being phased out | Actively replacing WHOIS |
Bottom line: Use RDAP when you need free, structured domain data with no API key. Use a commercial WHOIS API when you need historical records, reverse lookups, or bulk processing.
Copy-paste examples for querying WHOIS data from each provider:
curl "https://www.whoisxmlapi.com/whoisserver/WhoisService?apiKey=YOUR_KEY&domainName=example.com&outputFormat=JSON"
const res = await fetch(
'https://www.whoisxmlapi.com/whoisserver/WhoisService?' +
'apiKey=YOUR_KEY&domainName=example.com&outputFormat=JSON'
);
const data = await res.json();
console.log(data.WhoisRecord.registrarName);
console.log(data.WhoisRecord.expiresDate);
console.log(data.WhoisRecord.nameServers.hostNames);
import requests
resp = requests.get(
"https://www.whoisxmlapi.com/whoisserver/WhoisService",
params={
"apiKey": "YOUR_KEY",
"domainName": "example.com",
"outputFormat": "JSON"
}
)
data = resp.json()["WhoisRecord"]
print(f"Registrar: {data['registrarName']}")
print(f"Expires: {data['expiresDate']}")
print(f"Nameservers: {data['nameServers']['hostNames']}")
curl "https://rdap.org/domain/example.com"
const res = await fetch('https://rdap.org/domain/example.com');
const data = await res.json();
// Extract registration dates
const events = data.events || [];
const created = events.find(e => e.eventAction === 'registration');
const expires = events.find(e => e.eventAction === 'expiration');
console.log(`Created: ${created?.eventDate}`);
console.log(`Expires: ${expires?.eventDate}`);
console.log(`Status: ${data.status?.join(', ')}`);
import requests
resp = requests.get("https://rdap.org/domain/example.com")
data = resp.json()
events = {e["eventAction"]: e["eventDate"] for e in data.get("events", [])}
print(f"Created: {events.get('registration')}")
print(f"Expires: {events.get('expiration')}")
print(f"Status: {', '.join(data.get('status', []))}")
print(f"Nameservers: {[ns['ldhName'] for ns in data.get('nameservers', [])]}")
# Get DNS records including nameservers for any domain
curl "https://api.frostbyte.sh/v1/dns/lookup?domain=example.com" \
-H "X-API-Key: YOUR_KEY"
const res = await fetch(
'https://api.frostbyte.sh/v1/dns/lookup?domain=example.com',
{ headers: { 'X-API-Key': 'YOUR_KEY' } }
);
const data = await res.json();
// Get nameservers, MX records, and more
console.log('NS:', data.ns);
console.log('A:', data.a);
console.log('MX:', data.mx);
console.log('TXT:', data.txt);
import requests
resp = requests.get(
"https://api.frostbyte.sh/v1/dns/lookup",
params={"domain": "example.com"},
headers={"X-API-Key": "YOUR_KEY"}
)
data = resp.json()
print(f"Nameservers: {data.get('ns')}")
print(f"A Records: {data.get('a')}")
print(f"MX Records: {data.get('mx')}")
Try a live DNS lookup to see nameservers and records for any domain. Powered by Frostbyte DNS API.
What each provider charges once you exceed the free tier:
Match your use case to the best provider:
WhoisXML API - Largest database (25.5B records), reverse WHOIS, historical data, and threat intelligence feeds. Used by Fortune 1000 companies.
WhoisFreaks - Lifetime credit purchases starting at $15 for 5,000 lookups. Credits never expire. Also includes DNS, SSL, and subdomain data.
RDAP - Unlimited free queries with no API key. Structured JSON. The IETF standard replacement for WHOIS. Best for prototyping and lightweight use.
API Ninjas - Dead-simple API that works in minutes. Part of a 50+ API platform. Best when you need basic WHOIS data without complexity.
IP2WHOIS - Part of the IP2Location ecosystem. Best when you need WHOIS data alongside IP geolocation and other IP intelligence.
Frostbyte DNS - Get nameservers, A, MX, TXT, CNAME records in a single API call. Best when you need DNS data alongside domain information. No signup required.