Skip to main content
The RDAP CLI supports multiple query types defined by the RDAP RFCs. The tool can automatically detect the query type from your input, or you can specify it explicitly.

Auto-Detection

The tool uses intelligent pattern matching to determine query type:
1

AS Number Detection

Queries starting with “AS” followed by digits, or pure numeric queries, are detected as AS numbers:
  • AS15169 → Autnum query
  • 15169 → Autnum query
2

IP Address Detection

Queries containing colons (IPv6) or matching IPv4 patterns are detected as IP queries:
  • 8.8.8.8 → IP query
  • 2001:db8::1 → IP query
  • 1.1 → IP query (normalized to 1.0.0.1)
  • 8.8.8.0/24 → IP query (CIDR notation)
3

TLD Detection

Single-word queries matching the IANA TLD list are detected as TLD queries:
  • google → TLD query (queries .google TLD)
  • com → TLD query (queries .com TLD)
  • io → TLD query (queries .io TLD)
4

Domain Fallback

Everything else defaults to domain queries:
  • example.com → Domain query
  • google.com → Domain query
The TLD detection uses the official IANA TLD list (tlds.txt) which is updated via rdap --update.

Lookup Query Types

These query types retrieve a single object from the RDAP server.

Domain

Query domain name registration information.
# Auto-detected
rdap example.com

# Explicit type
rdap -t domain example.com
Returns: Domain object with nameservers, status, registrar, dates, and entities Special behavior: Automatically follows registrar referrals for multi-layer RDAP data

TLD (Top-Level Domain)

Query TLD information from IANA.
# Auto-detected
rdap google
rdap com

# Explicit type
rdap -t tld io
Returns: Domain object from IANA RDAP with TLD delegation information Server: Always queries https://rdap.iana.org/

IP Address

Query IP address or network information.
# IPv4
rdap 8.8.8.8
rdap 8.8.8.0/24

# IPv6
rdap 2001:db8::1
rdap 2001:db8::/32

# Shorthand (auto-normalized)
rdap 1.1          # → 1.0.0.1
rdap 1.2.3        # → 1.2.0.3

# Explicit type
rdap -t ip 192.0.2.1
Returns: IP Network object with address range, type, country, and abuse contact Normalization: Shorthand IPs are automatically expanded (e.g., 1.11.0.0.1)
rdap 8.8.8.8

Autnum (AS Number)

Query Autonomous System number information.
# With AS prefix
rdap AS15169

# Without AS prefix
rdap 15169

# Explicit type
rdap -t autnum 8888
Returns: Autnum object with AS number, name, type, country, and abuse contact Format: Accepts with or without “AS” prefix

Entity

Query entity (organization, person, contact) information.
# Requires explicit server
rdap -s https://rdap.db.ripe.net -t entity XTOM-RIPE
Returns: Entity object with contact information (vCard), roles, and handles
Entity queries typically require specifying the RDAP server with -s since there’s no global bootstrap for entities.

Nameserver

Query nameserver information.
# Requires explicit server
rdap -s https://rdap.verisign.com/com/v1 -t nameserver ns1.google.com
Returns: Nameserver object with hostname and IP addresses

Search Query Types

Search queries return multiple matching objects. These require explicit type specification. Search for domains by name pattern.
rdap -s https://rdap.example.com -t domain-search "example*"
Endpoint: GET /domains?name={pattern}

Domain Search by Nameserver

Find domains using a specific nameserver.
rdap -s https://rdap.example.com -t domain-search-by-nameserver ns1.example.com
Endpoint: GET /domains?nsLdhName={nameserver}

Domain Search by Nameserver IP

Find domains whose nameservers use a specific IP.
rdap -s https://rdap.example.com -t domain-search-by-nameserver-ip 192.0.2.1
Endpoint: GET /domains?nsIp={ip} Search for nameservers by name pattern.
rdap -s https://rdap.example.com -t nameserver-search "ns*.example.com"
Endpoint: GET /nameservers?name={pattern}

Nameserver Search by IP

Find nameservers using a specific IP address.
rdap -s https://rdap.example.com -t nameserver-search-by-ip 192.0.2.1
Endpoint: GET /nameservers?ip={ip} Search for entities by name.
rdap -s https://rdap.example.com -t entity-search "Example Corp"
Endpoint: GET /entities?fn={name}

Entity Search by Handle

Search for entities by handle/identifier.
rdap -s https://rdap.example.com -t entity-search-by-handle ABC-123
Endpoint: GET /entities?handle={handle}
Search queries are not widely supported by all RDAP servers. Many servers only support direct lookups.

Explicit Type Specification

Override auto-detection by specifying the query type:
rdap -t domain example.com
rdap -t ip 8.8.8.8
rdap -t autnum 15169
rdap -t tld google
  • domain - Domain name lookup
  • tld - Top-level domain lookup
  • ip - IP address/network lookup
  • autnum - AS number lookup
  • entity - Entity lookup
  • nameserver - Nameserver lookup
  • domain-search - Domain search
  • domain-search-by-nameserver - Domain search by NS
  • domain-search-by-nameserver-ip - Domain search by NS IP
  • nameserver-search - Nameserver search
  • nameserver-search-by-ip - Nameserver search by IP
  • entity-search - Entity search by name
  • entity-search-by-handle - Entity search by handle

Auto-Detection Logic

The detection algorithm (implemented in src/request.rs:detect_type_with_tld_check):
// Pseudocode
if query starts with "AS" and rest is digits:
    return Autnum
else if query is all digits:
    return Autnum
else if query looks like IP (contains : or matches IPv4 pattern):
    return Ip
else if query has no dots AND matches IANA TLD list:
    return Tld
else:
    return Domain (default)

Help Query

Query the RDAP server’s help endpoint:
rdap -s https://rdap.example.com -t help help
Returns server-specific help information.

Next Steps

Basic Queries

Start with basic RDAP queries

Output Formats

Learn about JSON and text output

Build docs developers (and LLMs) love