1.0.14 • Published 1 year ago

whois-parsed v1.0.14

Weekly downloads
26
License
MIT
Repository
github
Last release
1 year ago

Build Status Coverage Status

whois-parsed

A wrapper for the fantastic whois module that parses whois data into consistent JSON across multiple tlds. Supports proxies requiring authentication with username and password.

Inspiration (and regex) borrowed from the python library https://bitbucket.org/richardpenman/pywhois

If you find this package useful please give us a star!

Installation

npm install whois-parsed

Usage

var whoisOptions = {
  proxy: {
    ipaddress: '111.222.33.44',
    port: 1085,
    authentication: {
        username: "youruser",
        password: "yourpassword"
    },
    type: 5
  }
};
(async function(){
  const whois = require('whois-parsed');

  var results = await whois.lookup('google.com', whoisOptions);
  console.log(JSON.stringify(results, null, 2));
})()

Output:
{
  "domainName": "google.com",
  "updatedDate": "2018-02-21T10:45:07-0800",
  "creationDate": "1997-09-15T00:00:00-0700",
  "expirationDate": "2020-09-13T21:00:00-0700",
  "registrar": "MarkMonitor, Inc.",
  "status": [
    "clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited)",
    "clientTransferProhibited (https://www.icann.org/epp#clientTransferProhibited)",
    "clientDeleteProhibited (https://www.icann.org/epp#clientDeleteProhibited)",
    "serverUpdateProhibited (https://www.icann.org/epp#serverUpdateProhibited)",
    "serverTransferProhibited (https://www.icann.org/epp#serverTransferProhibited)",
    "serverDeleteProhibited (https://www.icann.org/epp#serverDeleteProhibited)"
  ],
  "isAvailable": false
}

Response Data

domainName

Domain Name being searched. Always populated.

isAvailable

true if the domain name is available. false if the domain name is currently registered. Always populated.

status

Array of status codes for the domain. Not populated for some TLDs.

creationDate

Date the domain was first registered for this particular registration. This date is reset when a domain expires but not when a domain registration is renewed. Not populated for some TLDs.

expirationDate

Date the domain registration is set to expire. This date can be extended by the registrant. Not populated for some TLDs.

updatedDate

Date the domain WHOIS record was last updated. Not populated for some TLDs.

Errors

whois-parsed does not handle retry logic by design. It isn't uncommon to have whois lookups throw errors if your application gets blocked or rate limited due to too many whois calls. You should implement retry logic, rate limiting, proxies, etc. in your application as needed.

Tests

npm test

Paid Version

If you don't want to deal with proxies, rate limits, retries, etc. then you may be interested in a hosted domain availability API: https://rapidapi.com/moneals/api/domaination-io. This API gives you 10,000 free calls per month.

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

1.0.14

1 year ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago