Skip to content

Repository files navigation

domaindetails

A fast CLI tool for domain registration lookups using RDAP and WHOIS.

Docker Hub Homebrew License: MIT

Built by DomainDetails.com - Privacy-first domain intelligence.

Features

  • RDAP Lookups - Modern JSON-based protocol (preferred)
  • WHOIS Fallback - Traditional protocol via DomainDetails.com API
  • Local Caching - Caches IANA bootstrap data for fast TLD resolution
  • Multiple Output Formats - Human-readable, JSON, or raw data
  • Cross-Platform - macOS, Linux, Windows

Installation

Homebrew (macOS/Linux)

brew install simplebytes-com/tap/domaindetails

Docker

docker pull domaindetails/cli

# Run a lookup
docker run domaindetails/cli lookup example.com

Binary Download

Download the latest release for your platform from GitHub Releases.

Build from Source

git clone https://github.com/simplebytes-com/domaindetails-cli.git
cd domaindetails-cli
make build
make install

Usage

Basic Lookup

# Auto-select best method (RDAP preferred, WHOIS fallback)
domaindetails lookup example.com

# RDAP only
domaindetails rdap example.com

# WHOIS only
domaindetails whois example.com

Output Formats

# JSON output
domaindetails lookup example.com --json

# Include raw response data
domaindetails lookup example.com --raw

# JSON with raw data
domaindetails lookup example.com --json --raw

Verbose Mode

domaindetails lookup example.com --verbose

Cache Management

# Update the IANA bootstrap cache
domaindetails cache update

# View cache status
domaindetails cache info

# Clear the cache
domaindetails cache clear

Example Output

────────────────────────────────────────────────────────────
Domain: example.com
Method: RDAP
────────────────────────────────────────────────────────────

Domain Name:     EXAMPLE.COM
Registrar:       RESERVED-Internet Assigned Numbers Authority

Created:         1995-08-14T04:00:00Z
Expires:         2025-08-13T04:00:00Z
Last Modified:   2024-08-14T07:01:34Z

Status:
  • client delete prohibited
  • client transfer prohibited
  • client update prohibited

Nameservers:
  • A.IANA-SERVERS.NET
  • B.IANA-SERVERS.NET

DNSSEC:          signed

JSON Output

{
  "domain": "example.com",
  "available": false,
  "method": "rdap",
  "parsed": {
    "domainName": "EXAMPLE.COM",
    "registrar": "RESERVED-Internet Assigned Numbers Authority",
    "creationDate": "1995-08-14T04:00:00Z",
    "expirationDate": "2025-08-13T04:00:00Z",
    "lastModified": "2024-08-14T07:01:34Z",
    "nameservers": ["A.IANA-SERVERS.NET", "B.IANA-SERVERS.NET"],
    "status": ["client delete prohibited", "client transfer prohibited"],
    "dnssec": "signed"
  }
}

How It Works

  1. RDAP Lookups: Queries RDAP servers directly using the IANA bootstrap file (cached locally at ~/.domaindetails/)
  2. WHOIS Lookups: Routes through the DomainDetails.com API which handles raw WHOIS queries and parsing

Experimental: Wayback domain history

The dependency-free sample script in examples/wayback_domain_history.py analyzes representative Wayback Machine captures, reports likely major changes, identifies the last capture that looks like a developed website, and extracts historical contact details with source URLs.

python3 examples/wayback_domain_history.py example.com \
  --from 2005 \
  --max-snapshots 20 \
  --output example-history.json

The script deliberately describes dates as observations rather than exact transition dates. Contact information is historical and must not be treated as currently verified. It uses the public Internet Archive endpoints, so larger domains may be slow or rate-limited.

IANA Bootstrap Cache

The CLI caches the IANA RDAP bootstrap file locally to avoid repeated network requests:

  • Location: ~/.domaindetails/rdap-bootstrap.json
  • TTL: 24 hours
  • Fallback: Uses stale cache if refresh fails

API

This CLI uses the DomainDetails.com API for WHOIS lookups:

Endpoint Description
GET /api/whois?domain=example.com WHOIS lookup with parsing

The WHOIS parser is open source: @domaindetails/whois-parser

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.

Links

About

Fast CLI tool for domain registration lookups (RDAP/WHOIS)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages