{"id":13582918,"url":"https://github.com/LayeredStudio/whoiser","last_synced_at":"2025-04-06T18:31:39.944Z","repository":{"id":34079016,"uuid":"168990427","full_name":"LayeredStudio/whoiser","owner":"LayeredStudio","description":"🌍 Easy to use WHOIS info for domains, TLDs and IPs","archived":false,"fork":false,"pushed_at":"2025-03-03T17:10:59.000Z","size":313,"stargazers_count":231,"open_issues_count":21,"forks_count":34,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T19:35:18.054Z","etag":null,"topics":["domain","ip","tlds","whois","whois-client","whois-info","whois-lookup"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LayeredStudio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-03T20:33:19.000Z","updated_at":"2025-03-18T16:57:30.000Z","dependencies_parsed_at":"2024-06-18T15:32:01.930Z","dependency_job_id":"7b01ccd1-e2c3-4783-af1e-12dc6ab6002b","html_url":"https://github.com/LayeredStudio/whoiser","commit_stats":{"total_commits":185,"total_committers":18,"mean_commits":"10.277777777777779","dds":"0.48108108108108105","last_synced_commit":"fcafa6f01a8b1b04fab2f36350b91bd2d1df59c5"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayeredStudio%2Fwhoiser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayeredStudio%2Fwhoiser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayeredStudio%2Fwhoiser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayeredStudio%2Fwhoiser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LayeredStudio","download_url":"https://codeload.github.com/LayeredStudio/whoiser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284956,"owners_count":20913704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain","ip","tlds","whois","whois-client","whois-info","whois-lookup"],"created_at":"2024-08-01T15:03:07.557Z","updated_at":"2025-04-06T18:31:39.933Z","avatar_url":"https://github.com/LayeredStudio.png","language":"TypeScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# 🌍 Whoiser\n\n**whoiser** is a WHOIS client for Node.js that helps with querying WHOIS servers for TLDs, domain names, AS numbers and IPs.\n\nHas 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')`.\nApplies minimal parsing to results, returning same data format from different WHOIS servers.\n\n\u003e [!CAUTION]\n\u003e v2 is under active development! The code in `main` branch is for v2. Breaking changes:\n\u003e - ESM only\n\u003e - removed `whoiser()` method, use individual `whoisDomain`, `whoisTld`, `whoisIp`, `whoisAsn`\n\u003e - removed `allTlds()`\n\u003e\n\u003e Until v2 dev is complete, install latest v1. The docs below are for v1\n\n### Highlights\n* Returns WHOIS info for any internet address\n* Requires zero config, but configurable when needed\n* Recognises queries and routes the request to correct server\n* Minimal parsing to provide consistent results across WHOIS servers\n* Uses WHOIS servers from IANA, if not provided\n* Discover all available TLDs\n\n→ See it in action here https://dmns.app\n\n## Getting Started\n\n#### Installation\n\n```npm i whoiser```\n\n#### Usage\nThe library has a simple API.\nUse `whoiser(query)` with any query you would want OR use specific functions with options like `whoiser.domain(domain, {options})`, `whoiser.ip(ip, {options})`\n\n#### Example\n```js\nconst whoiser = require('whoiser')\n\nconst domainWhois = whoiser('google.com')\nconst tldWhois = whoiser('.net')\nconst ipWhois = whoiser('1.1.1.1')\n```\n\n→ [See all examples](https://github.com/LayeredStudio/whoiser/tree/master/examples)\n\n## Client API\n- `whoiser(query, options)` - Get WHOIS data for any internet address\n- [`whoiser.domain(domain, options)`](#domain-whois) - Get parsed WHOIS data for a domain\n- `whoiser.tld(tld, options)` - Get WHOIS data for a TLD\n- [`whoiser.asn(asn, options)`](#as-number-whois) - Get WHOIS data for an AS number\n- [`whoiser.ip(ip, options)`](#ip-whois) - Get WHOIS data for a IP\n- `whoiser.allTlds` - Returns a list of all TLDs, [downloaded from IANA](https://www.iana.org/domains/root/db)\n- `whoiser.query(options)` - Query a WHOIS server for data\n\n### Domain whois\nGet WHOIS info for domains.\n\n`whoiser.domain(domain, options): Promise\u003cObject\u003cwhoisServer\u003e\u003e`\n- `domain` - Domain name, excluding any subdomain. Ex: 'google.com'\n- `options` - Object of options to use, all optional:\n\t- `host` - WHOIS server to query. Default: WHOIS server from IANA\n\t- `timeout` - WHOIS server request timeout in ms. Default: 1500\n\t- `follow` - How many WHOIS server to query. 1 = registry server (faster), 2 = registry + registrar (more domain details). Default: 2\n\t- `raw` - Return the raw WHOIS result in response. Added to `__raw`\n\t- `ignorePrivacy` - Show or hide the WHOIS protected data from response, accepts boolean. Default: true\n\n```js\nconst whoiser = require('whoiser');\n\n(async () =\u003e {\n\n\t// WHOIS info from Registry (Verisign) AND Registrar (MarkMonitor) whois servers\n\tlet domainInfo = await whoiser('google.com')\n\n\t// OR with options for whois server and how many WHOIS servers to query\n\tlet domainInfo2 = await whoiser.domain('blog.google', {host: 'whois.nic.google', follow: 1})\n\n\tconsole.log(domainInfo, domainInfo2)\n})();\n```\nReturns a promise which resolves with an `Object` of WHOIS servers checked:\n```js\n{\n\t\t\"whois.verisign-grs.com\": {\n\t\t\t\t\"Domain Name\": \"GOOGLE.COM\",\n\t\t\t\t\"Registrar WHOIS Server\": \"whois.markmonitor.com\",\n\t\t\t\t...\n\t\t},\n\t\t\"whois.markmonitor.com\": {\n\t\t\t\t\"Domain Name\": \"google.com\",\n\t\t\t\t\"Creation Date\": \"1997-09-15T00:00:00-0700\",\n\t\t\t\t\"Expiry Date\": \"2020-09-13T21:00:00-0700\",\n\t\t\t\t\"Registrar\": \"MarkMonitor, Inc.\",\n\t\t\t\t\"Domain Status\": [\n\t\t\t\t\t\t\"clientUpdateProhibited\",\n\t\t\t\t\t\t\"clientTransferProhibited\"\n\t\t\t\t],\n\t\t\t\t...\n\t\t\t\t\"Name Server\": [\n\t\t\t\t\t\t\"ns1.google.com\",\n\t\t\t\t\t\t\"ns2.google.com\"\n\t\t\t\t],\n\t\t\t\t\"text\": [\n\t\t\t\t\t\t\"For more information on WHOIS status codes, please visit:\",\n\t\t\t\t\t\t...\n\t\t\t\t]\n\t\t}\n}\n```\n\n### IP whois\n\nGet WHOIS info for IPs\n\n`whoiser.ip(ip, options): Promise\u003cObject\u003e`\n- `ip` - IP. Ex: '1.1.1.1'\n- `options` - Object of options to use, all optional:\n\t- `host` - WHOIS server to query. Default: WHOIS server from IANA\n\t- `timeout` - WHOIS server request timeout in ms. Default: 1500\n\t- `raw` - Return the raw WHOIS result in response. Added to `__raw`\n\n```js\nconst whoiser = require('whoiser');\n\n(async () =\u003e {\n\n\t// WHOIS info with auto-discovering for WHOIS server\n\tlet ipInfo = await whoiser('1.1.1.1')\n\n\t// OR with options for whois server\n\tlet ipInfo2 = await whoiser.ip('8.8.8.8', {host: 'whois.arin.net'})\n\n\tconsole.log(ipInfo, ipInfo2)\n})();\n```\nReturns a promise which resolves with an `Array` of WHOIS info lines:\n```js\n{\n\trange: '2606:4700:: - 2606:4700:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF',\n\troute: '2606:4700::/32',\n\tNetName: 'CLOUDFLARENET',\n\tNetHandle: 'NET6-2606-4700-1',\n\tParent: 'NET6-2600 (NET6-2600-1)',\n\tNetType: 'Direct Allocation',\n\tasn: 'AS13335',\n\tOrganization: 'Cloudflare, Inc. (CLOUD14)',\n\tRegDate: '2011-11-01',\n\tUpdated: '2017-02-17',\n\tComment: 'All Cloudflare abuse reporting can be done via  https://www.cloudflare.com/abuse',\n}\n```\n\n### AS Number whois\n\nGet WHOIS info for an AS number\n\n`whoiser.asn(asn, options): Promise\u003cObject\u003e`\n- `asn` - ASN. Ex: 'AS15169' or `15169`\n- `options` - Object of options to use, all optional:\n\t- `host` - WHOIS server to query. Default: WHOIS server from IANA\n\t- `timeout` - WHOIS server request timeout in ms. Default: 1500\n\t- `raw` - Return the raw WHOIS result in response. Added to `__raw`\n\n```js\nconst whoiser = require('whoiser');\n\n(async () =\u003e {\n\n\t\t// WHOIS info for ASN15169\n\t\tlet whois = await whoiser.asn(15169)\n\n\t\tconsole.log(whois)\n})();\n```\nReturns a promise which resolves with an `Object` of WHOIS info:\n```js\n{\n\tASNumber: '15169',\n\tASName: 'GOOGLE',\n\tASHandle: 'AS15169',\n\tRegDate: '2000-03-30',\n\tUpdated: '2012-02-24',\n\tRef: 'https://rdap.arin.net/registry/autnum/15169',\n}\n```\n\n## Roadmap\nAiming to have these features:\n- [x] helper function to query WHOIS servers -\u003e `whoiser.query()`\n- [x] query whois for TLDs with parsed result -\u003e `whoiser.tld()`\n- [x] query whois for domains with parsed result -\u003e `whoiser.domain()`\n- [x] query whois for IPs and return parsed result -\u003e `whoiser.ip()`\n- [x] query whois for ASN with parsed result -\u003e `whoiser.asn()`\n- [x] Punycode support\n- [ ] Normalize Domain WHOIS field names, removing inconsistencies between WHOIS servers\n- [ ] Test more IPs and ASNs to deliver consistent WHOIS results\n\n## Unsupported TLDs\n- `.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/5efdeaa8e4f2d8001a00312d\n\n## More\n\nPlease report any issues here on GitHub.\n[Any contributions are welcome](CONTRIBUTING.md)\n\n## License\n\n[MIT](LICENSE)\n\nCopyright (c) Andrei Igna, Layered\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLayeredStudio%2Fwhoiser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLayeredStudio%2Fwhoiser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLayeredStudio%2Fwhoiser/lists"}