Skip to content

rdap-cli

rdap-cli is a lightweight RDAP-only command-line client written in C.

It provides a modern alternative to the traditional whois command by querying Registration Data Access Protocol (RDAP) services over HTTPS and returning either concise human-readable information or complete RDAP JSON.

The project intentionally does not fall back to WHOIS.

Features

  • Written in C11.
  • RDAP only; no WHOIS fallback.
  • Automatic query type detection.
  • Domain, IPv4, IPv6, and ASN lookups.
  • Automatic authoritative RDAP discovery using IANA bootstrap registries.
  • HTTPS-only RDAP service access.
  • Concise human-readable output by default.
  • Complete JSON output with --json.
  • Registrar RDAP referral following with --follow.
  • Extended human-readable output with --full.
  • RDAP notices and links.
  • DNSSEC and DS record display for domains.
  • Registrar and abuse-contact information.
  • Verbose discovery and request diagnostics.

Quick start

Build the client:

make

Run a domain lookup:

./rdap osbornepro.com

Look up an IPv4 address:

./rdap 1.1.1.1

Look up an IPv6 address:

./rdap 2606:4700:4700::1111

Look up an ASN:

./rdap AS13335

Numeric ASNs are also accepted:

./rdap 13335

Complete JSON

Use --json when you need the complete RDAP response:

rdap --json osbornepro.com

When --json and --follow are used together, the output contains both the registry and registrar responses:

{
  "registry": {},
  "registrar": {}
}

If no registrar RDAP referral is available, the registrar value is null.

Authoritative service discovery

rdap-cli uses the appropriate IANA RDAP bootstrap registry:

https://data.iana.org/rdap/dns.json
https://data.iana.org/rdap/ipv4.json
https://data.iana.org/rdap/ipv6.json
https://data.iana.org/rdap/asn.json

The selected authoritative service is queried directly over HTTPS. This follows the RDAP bootstrap model described by RFC 9224.

Project

Source code:

https://github.com/OsbornePro/rdap-cli

The project is licensed under the GNU General Public License version 3.