RDAP lookup API: how to query the registries directly

RDAP is a free HTTPS API run by each domain registry: you GET https://<registry server>/domain/example.com and receive JSON. To find the server, read IANA's bootstrap file at data.iana.org/rdap/dns.json, or send the request to rdap.org, which redirects you. If you'd rather get the parsed dates plus DNS, mail and HTTPS checks in one call, our Domain Report API does that for $0.01 per domain.

Try it free Domain Report API — WHOIS, DNS, email set-up and HTTPS · $0.01 / call

How RDAP finds the right registry

There is no single RDAP server. Each registry runs its own, and IANA publishes which server answers for which ending in a JSON "bootstrap" file. Its services array holds pairs: a list of endings and a list of base URLs.

rdap.org is a free redirector built on the same file: ask it for /domain/example.com and it sends you to the registry. It's convenient for scripts but it's a community service, so for volume, read the bootstrap file yourself and cache it for a day.

Bootstrap and lookup in JavaScript

const boot = await (await fetch("https://data.iana.org/rdap/dns.json")).json();

function rdapBase(domain) {
  const tld = domain.split(".").pop();
  const hit = boot.services.find(([tlds]) => tlds.includes(tld));
  return hit ? hit[1].find((u) => u.startsWith("https://")) : null;
}

async function rdap(domain) {
  const base = rdapBase(domain);
  if (!base) return null; // this ending publishes no RDAP
  const url = base.replace(/\/?$/, "/") + "domain/" + domain;
  const r = await fetch(url, { headers: { Accept: "application/rdap+json" } });
  return r.ok ? r.json() : null;
}

const d = await rdap("example.com");
console.log(d?.events?.map((e) => `${e.eventAction}: ${e.eventDate}`));

Reading the response

FieldWhat it holds
eventsDated events; look for eventAction "registration", "expiration" and "last changed"
statusEPP status codes such as "client transfer prohibited" or "redemption period"
entitiesRegistrar and contacts as vCards; the registrar has the role "registrar"
nameserversThe domain's nameservers (ldhName)
secureDNSdelegationSigned: true if DNSSEC is on

Gaps to plan for

The same lookup, already parsed

The Domain Report API does the bootstrap step, falls back to rdap.org, and returns flat fields: registrar, created, expires, updated, age_days, days_to_expiry, status, dnssec and nameservers. It also adds live DNS, SPF and DMARC records and an HTTPS check. POST {"domain": "example.com"} to /api/x402/services/2EI0aA1Eztau; it's $0.01 per call via x402, and only charged when it works.

The product

Questions

Is RDAP free to use?

Yes. Registry RDAP servers and rdap.org are free, but they apply rate limits, and some ask for reasonable use.

Does RDAP work for IP addresses too?

Yes. The regional internet registries run RDAP for IP ranges and AS numbers, with their own bootstrap files at data.iana.org/rdap/. The Domain Report API covers domains only.

Why is the contact data empty?

Personal details are redacted under privacy rules. That's normal and isn't a bug in your parser.

Related

Updated 2026-12-01