1.0.44 • Published 7 months ago

@cleandns/whois-rdap v1.0.44

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

CleanDNS Tools: WHOIS/RDAP lookup

WHOIS/RDAP lookups for domain names.

Documentation

whois(target: string, options?: WhoisParameters): Promise<WhoisResponse>

Performs an RDAP or port 43 WHOIS lookup for a given domain name, and attempts to normalize the response.

Parameters

  • target (string): The domain name to look up.
  • options (WhoisParameters): Optional parameters for WHOIS/RDAP resolution.

    • fetch (fetch): A drop-in replacement for Node's built-in fetch, useful for proxying RDAP lookups.
    • thinOnly (boolean): Whether to only fetch a registry-level ("thin") RDAP response, instead of attempting a registrar-level ("thick") response.

Returns

  • Promise<WhoisResponse>: A promise that resolves to a WhoisResponse object containing the RDAP or WHOIS information for the domain.

WhoisResponse

An object containing the RDAP or WHOIS information for the domain.

  • found (boolean): Whether the domain could be found via RDAP or port 43 lookup.
  • registrar (object): The registrar information for the domain.
    • id (string): The registrar's ID (IANA or otherwise).
    • name (string): The registrar's name.
    • email (string): The registrar's abuse email contact, if available.
  • reseller (string): The name of the domain's reseller, if available.
  • status (string[]): The EPP statuses for the domain.
  • statusDelta (object[]): Any discrepancies in EPP status between the registry response and the registrar response.
    • status (string): An EPP status.
    • thin (boolean): Whether this EPP status was only found in the registry (thin) response.
    • thick (boolean): Whether this EPP status was only found in the registrar (thick) response.
  • nameservers (string[]): The nameservers for the domain.
  • ts (object): The timestamps associated with the domain, if available.
    • created (Date): The registration or creation date for the domain.
    • updated (Date): The last update date for the domain.
    • expires (Date): The expiration date for the domain.

Example

import { whois } from '@cleandns/whois-rdap';

whois('example.com')
  .then((response) => {
    console.log(response);
  })
  .catch((error) => {
    console.error(error);
  });

Installation

npm install @cleandns/whois

Caveats / limitations

  • This package is currently intended for domain name lookups only. IPv4/IPv6 address support is not guaranteed.

  • Parsing of port 43 WHOIS responses is a work in progress.

1.0.40

8 months ago

1.0.44

7 months ago

1.0.29

12 months ago

1.0.28

12 months ago

1.0.33

10 months ago

1.0.32

11 months ago

1.0.31

11 months ago

1.0.30

12 months ago

1.0.37

9 months ago

1.0.36

10 months ago

1.0.35

10 months ago

1.0.34

10 months ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.19

1 year ago

1.0.2

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.11

1 year ago

1.0.21

1 year ago

1.0.10

1 year ago

1.0.20

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.1

1 year ago

1.0.0

2 years ago