I was building a side project where I needed domain registration data. I used WHOIS at first, but the output is different for every registrar, there is no standard format, and my parsing code kept breaking.
Then I found out WHOIS is actually deprecated. ICANN has been pushing RDAP (Registration Data Access Protocol) as the replacement. It returns JSON. It works over HTTPS. Most registries already switched.
The problem is that RDAP is still hard to use directly.
There is no single server. Each TLD has its own, and you need to check the IANA bootstrap registry to figure out which one to query. For .com and .net, the registry only stores basic data. The registrar (GoDaddy, Cloudflare, etc.) holds the rest on a separate server. So you have to make two requests and merge them.
And then there is vcardArray. This is how RDAP stores contact data:
["vcard", [
["version", {}, "text", "4.0"],
["fn", {}, "text", "MarkMonitor Inc."],
["tel", {"type": "voice"}, "uri", "tel:+1.2086851750"],
["email", {}, "text", "abusecomplaints@markmonitor.com"]
]]
Try parsing that across 1,200 different servers. It does not go well.
So I built RDAP API. One endpoint, same JSON for every TLD:
{
"domain": "google.com",
"registrar": { "name": "MarkMonitor Inc.", "iana_id": "292" },
"dates": {
"registered": "1997-09-15T04:00:00Z",
"expires": "2028-09-14T04:00:00Z"
},
"nameservers": ["ns1.google.com", "ns2.google.com"]
}
It handles the bootstrap registry, the registrar follow-through, the vcardArray parsing, and the rate limits. It also supports IP and ASN lookups, and bulk queries (up to 10 per request).
There is a free lookup tool on the homepage if you want to try it. No account needed, works for domains, IPs, and ASNs.
I also published SDKs for Python, Node.js, PHP, Go, and Java. Here is the Python one:
from rdapapi import RdapApi
client = RdapApi("YOUR_API_KEY")
result = client.domains.lookup("google.com", follow=True)
print(result.registrar.name) # MarkMonitor Inc.
This is my first SaaS. The API starts at $9/mo with a free trial. Docs here.
Is anyone still using port 43 WHOIS in production? Curious how you handle the different formats per registrar.
Top comments (0)