Gathering detailed insights and metrics for whoiser-json
Gathering detailed insights and metrics for whoiser-json
Gathering detailed insights and metrics for whoiser-json
Gathering detailed insights and metrics for whoiser-json
npm install whoiser-json
Typescript
Module System
Min. Node Version
Node Version
NPM Version
72.5
Supply Chain
99.4
Quality
76.1
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
246
Last Day
1
Last Week
3
Last Month
13
Last Year
246
245 Commits
1 Forks
3 Branches
1 Contributors
Latest Version
1.0.0
Package Id
whoiser-json@1.0.0
Unpacked Size
64.68 kB
Size
19.17 kB
File Count
30
NPM Version
9.8.0
Node Version
20.5.1
Publised On
04 Mar 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
3
Compared to previous week
Last month
-7.1%
13
Compared to previous month
Last year
0%
246
Compared to previous year
whoiser is a WHOIS client for Node.js that helps with querying WHOIS servers for TLDs, domain names, AS numbers and IPs.
Has support for auto-discovery WHOIS servers for TLDs and IPs allocators, making it easy to get WHOIS info with a single call like whoiser('google.com')
or whoiser('1.1.1.1')
.
Applies minimal parsing to results, returning same data format from different WHOIS servers.
→ See it in action here https://dmns.app
npm i whoiser
The library has a simple API.
Use whoiser(query)
with any query you would want OR use specific functions with options like whoiser.domain(domain, {options})
, whoiser.ip(ip, {options})
1const whoiser = require('whoiser') 2 3const domainWhois = whoiser('google.com') 4const tldWhois = whoiser('.net') 5const ipWhois = whoiser('1.1.1.1')
whoiser(query, options)
- Get WHOIS data for any internet addresswhoiser.domain(domain, options)
- Get parsed WHOIS data for a domainwhoiser.tld(tld, options)
- Get WHOIS data for a TLDwhoiser.asn(asn, options)
- Get WHOIS data for an AS numberwhoiser.ip(ip, options)
- Get WHOIS data for a IPwhoiser.allTlds
- Returns a list of all TLDs, downloaded from IANAwhoiser.query(options)
- Query a WHOIS server for dataGet WHOIS info for domains.
whoiser.domain(domain, options): Promise<Object<whoisServer>>
domain
- Domain name, excluding any subdomain. Ex: 'google.com'options
- Object of options to use, all optional:
host
- WHOIS server to query. Default: WHOIS server from IANAtimeout
- WHOIS server request timeout in ms. Default: 1500follow
- How many WHOIS server to query. 1 = registry server (faster), 2 = registry + registrar (more domain details). Default: 2raw
- Return the raw WHOIS result in response. Added to __raw
ignorePrivacy
- Show or hide the WHOIS protected data from response, accepts boolean. Default: true1const whoiser = require('whoiser'); 2 3(async () => { 4 5 // WHOIS info from Registry (Verisign) AND Registrar (MarkMonitor) whois servers 6 let domainInfo = await whoiser('google.com') 7 8 // OR with options for whois server and how many WHOIS servers to query 9 let domainInfo2 = await whoiser.domain('blog.google', {host: 'whois.nic.google', follow: 1}) 10 11 console.log(domainInfo, domainInfo2) 12})();
Returns a promise which resolves with an Object
of WHOIS servers checked:
1{ 2 "whois.verisign-grs.com": { 3 "Domain Name": "GOOGLE.COM", 4 "Registrar WHOIS Server": "whois.markmonitor.com", 5 ... 6 }, 7 "whois.markmonitor.com": { 8 "Domain Name": "google.com", 9 "Creation Date": "1997-09-15T00:00:00-0700", 10 "Expiry Date": "2020-09-13T21:00:00-0700", 11 "Registrar": "MarkMonitor, Inc.", 12 "Domain Status": [ 13 "clientUpdateProhibited", 14 "clientTransferProhibited" 15 ], 16 ... 17 "Name Server": [ 18 "ns1.google.com", 19 "ns2.google.com" 20 ], 21 "text": [ 22 "For more information on WHOIS status codes, please visit:", 23 ... 24 ] 25 } 26}
Get WHOIS info for IPs
whoiser.ip(ip, options): Promise<Object>
ip
- IP. Ex: '1.1.1.1'options
- Object of options to use, all optional:
host
- WHOIS server to query. Default: WHOIS server from IANAtimeout
- WHOIS server request timeout in ms. Default: 1500raw
- Return the raw WHOIS result in response. Added to __raw
1const whoiser = require('whoiser'); 2 3(async () => { 4 5 // WHOIS info with auto-discovering for WHOIS server 6 let ipInfo = await whoiser('1.1.1.1') 7 8 // OR with options for whois server 9 let ipInfo2 = await whoiser.ip('8.8.8.8', {host: 'whois.arin.net'}) 10 11 console.log(ipInfo, ipInfo2) 12})();
Returns a promise which resolves with an Array
of WHOIS info lines:
1{ 2 range: '2606:4700:: - 2606:4700:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF', 3 route: '2606:4700::/32', 4 NetName: 'CLOUDFLARENET', 5 NetHandle: 'NET6-2606-4700-1', 6 Parent: 'NET6-2600 (NET6-2600-1)', 7 NetType: 'Direct Allocation', 8 asn: 'AS13335', 9 Organization: 'Cloudflare, Inc. (CLOUD14)', 10 RegDate: '2011-11-01', 11 Updated: '2017-02-17', 12 Comment: 'All Cloudflare abuse reporting can be done via https://www.cloudflare.com/abuse', 13}
Get WHOIS info for an AS number
whoiser.asn(asn, options): Promise<Object>
asn
- ASN. Ex: 'AS15169' or 15169
options
- Object of options to use, all optional:
host
- WHOIS server to query. Default: WHOIS server from IANAtimeout
- WHOIS server request timeout in ms. Default: 1500raw
- Return the raw WHOIS result in response. Added to __raw
1const whoiser = require('whoiser'); 2 3(async () => { 4 5 // WHOIS info for ASN15169 6 let whois = await whoiser.asn(15169) 7 8 console.log(whois) 9})();
Returns a promise which resolves with an Object
of WHOIS info:
1{ 2 ASNumber: '15169', 3 ASName: 'GOOGLE', 4 ASHandle: 'AS15169', 5 RegDate: '2000-03-30', 6 Updated: '2012-02-24', 7 Ref: 'https://rdap.arin.net/registry/autnum/15169', 8}
Aiming to have these features:
whoiser.query()
whoiser.tld()
whoiser.domain()
whoiser.ip()
whoiser.asn()
.ch
- WHOIS server for .ch doesn't return WHOIS info, works only in browser https://www.nic.ch/whois/. This library can be used only to check .ch domain availability, example here https://runkit.com/andreiigna/5efdeaa8e4f2d8001a00312dPlease report any issues here on GitHub. Any contributions are welcome
Copyright (c) Andrei Igna, Layered
No vulnerabilities found.
No security vulnerabilities found.