Provide current and historical ownership information on domains / IPs. Identify all connections between domains, registrants, registrars, and DNS servers.
WhoisXML API has released a Python script that tells you whether a domain’s top-level domain (TLD) (including multi-level TLDs like .co.uk) supports RDAP, WHOIS, both protocols, or neither, based on a reference TLD dataset.
The script is useful for anyone performing programmatic WHOIS lookups who wants to know in advance which protocol a TLD responds to. It works in two modes and requires a TLD reference CSV (which you can get from rdap.wxapros.com) as its first input: