A Python command-line interface for querying RDAP (Registration Data Access Protocol) servers. RDAP is the modern replacement for WHOIS, providing structured data about domain names, IP addresses, and Autonomous System Numbers (ASNs).
- Query domain names, IP addresses (IPv4/IPv6), and ASNs
- Automatic RDAP server discovery using IANA bootstrap services
- Beautiful formatted output with colors
- JSON output option for scripting
- No external dependencies (pure Python 3 standard library)
- Fast and lightweight
- Python 3.6 or higher
- No additional packages required (uses only standard library)
Run the installation script:
cd rdap-cli
./install.shThis will install the rdap command to /usr/local/bin (may require sudo).
# Copy the script to a directory in your PATH
sudo cp rdap /usr/local/bin/rdap
sudo chmod +x /usr/local/bin/rdap./rdap google.com# Query a domain name
rdap google.com
rdap example.org
# Query an IP address
rdap 8.8.8.8
rdap 2001:4860:4860::8888
# Query an ASN
rdap AS15169
rdap AS13335# Get raw JSON output
rdap google.com --json
# Disable colored output
rdap google.com --no-color
# Set custom timeout (default: 10 seconds)
rdap example.com --timeout 30
# Show help
rdap --help$ rdap google.com
Querying RDAP for: google.com
=== Domain Information ===
Domain Name: GOOGLE.COM
Handle: 2138514_DOMAIN_COM-VRSN
Status: client delete prohibited, client transfer prohibited, client update prohibited
Important Dates
---------------
Registration: 1997-09-15 04:00:00 UTC
Expiration: 2028-09-14 04:00:00 UTC
Last Changed: 2019-09-09 15:39:04 UTC
Nameservers
-----------
- NS1.GOOGLE.COM
- NS2.GOOGLE.COM
- NS3.GOOGLE.COM
- NS4.GOOGLE.COM
Entities
--------
[Registrar]
MarkMonitor Inc.
Handle: 292$ rdap 8.8.8.8
Querying RDAP for: 8.8.8.8
=== IP Network Information ===
IP Version: IPv4
Start Address: 8.8.8.0
End Address: 8.8.8.255
Name: GOGL
Type: DIRECT ALLOCATION
Status: active
Entities
--------
[Registrant]
Google LLC
Handle: GOGL$ rdap AS15169
Querying RDAP for: AS15169
=== Autonomous System Information ===
ASN: AS15169
Handle: AS15169
Name: GOOGLE
Status: active
Entities
--------
[Technical]
Google LLC
Email: [email protected]
Phone: +1-650-253-0000- Query detection: The tool automatically detects whether you're querying a domain, IP, or ASN
- Bootstrap discovery: It fetches the appropriate IANA bootstrap file to find the correct RDAP server
- RDAP query: It sends an HTTPS request to the RDAP server
- Response formatting: The JSON response is formatted into a human-readable output
RDAP (Registration Data Access Protocol) is the successor to WHOIS:
- Structured data: JSON format instead of free-form text
- Standardized: RFC 7480-7485 standardization
- Secure: HTTPS with encryption
- Better privacy: More granular access controls
- Internationalization: Full Unicode support
- Machine-readable: Easy to parse and integrate
This tool queries RDAP servers directly via HTTPS. Only the relevant registry sees your query - there's no intermediary proxy.
sudo rm /usr/local/bin/rdapOr use the uninstall script:
./uninstall.shMIT License - See LICENSE file for details
- RDAP.org
- IANA RDAP Bootstrap Service
- RFC 7480 - HTTP Usage in RDAP
- RFC 9082 - Registration Data Access Protocol (RDAP) Query Format
- RFC 9083 - JSON Responses for RDAP
Contributions are welcome! Feel free to open issues or submit pull requests.