TLD catalog endpoints
Two new methods list the TLDs the API can resolve and how often each registry's RDAP server populates common fields. Neither endpoint counts against your monthly quota.
tlds = api.tlds()
print(f"{tlds.meta.count} TLDs, coverage {tlds.meta.coverage:.0%}")
for tld in tlds.data:
if tld.field_availability is not None:
print(f"{tld.tld}: expires_at={tld.field_availability.expires_at}")Filters: since (ISO 8601), server (hostname). Pass the previous etag via if_none_match to skip unchanged transfers. The method returns None on HTTP 304.
later = api.tlds(if_none_match=tlds.etag)
com = api.tld("com")AsyncRdapApi exposes the same methods.
NotSupportedError
A new NotSupportedError subclass of NotFoundError is raised on HTTP 404 when the API returns error: "not_supported" (no RDAP coverage for the TLD, IP range, or ASN range). Existing except NotFoundError blocks keep working.
from rdapapi import NotFoundError, NotSupportedError
try:
api.domain("example.nope")
except NotSupportedError:
print("TLD not covered by RDAP")
except NotFoundError:
print("Domain not registered")Install
pip install --upgrade rdapapi