{"_id":"@addidotlol/whoiser-cf","_rev":"4-b0e38b4fae6cc0d866cba7fbea6e76d5","name":"@addidotlol/whoiser-cf","dist-tags":{"latest":"2.0.0-beta.10"},"versions":{"2.0.0-beta.7":{"name":"@addidotlol/whoiser-cf","version":"2.0.0-beta.7","keywords":["whois","domain","tld","ip"],"author":{"name":"Andrei Igna","email":"andrei@laye.red"},"license":"MIT","_id":"@addidotlol/whoiser-cf@2.0.0-beta.7","maintainers":[{"name":"embedvr","email":"npm@helium.email"}],"contributors":[{"name":"Addison LeClair","email":"me@addi.lol"}],"homepage":"https://github.com/addidotlol/whoiser-cf#readme","bugs":{"url":"https://github.com/addidotlol/whoiser-cf/issues"},"dist":{"shasum":"8ab6ff7f8989d681f478c692e841249710ca2b9b","tarball":"https://registry.npmjs.org/@addidotlol/whoiser-cf/-/whoiser-cf-2.0.0-beta.7.tgz","fileCount":11,"integrity":"sha512-3GzN2Y//Jz7qRuNYWwxxbqazT4LnqlLqwZwBhmfkgKQheWhELMvtnV9gg2eVw5YRlQRXZQsENBjDJ0qlnSo2KQ==","signatures":[{"sig":"MEYCIQCkcvXNTb3NqTQ8JWwWqJ0l22Zj8AWOmv+2lnlqQYBTbAIhAPdYNmxVFWeC+P/+zOe9ur5/XOQUHnUBWD+Anq09+Rzv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49602},"type":"module","types":"./dist/whoiser.d.ts","exports":"./dist/whoiser.js","gitHead":"1eb0c4178ee07d97b0104caf8a6b7e5895a3102e","scripts":{"dev":"node --enable-source-maps --watch src/whoiser.ts","test":"node --test src/*.test.ts","build":"tsc","prettier":"prettier \"src/*.js\"","prettier:write":"npm run prettier -- --write"},"_npmUser":{"name":"embedvr","email":"npm@helium.email"},"repository":{"url":"git+ssh://git@github.com/addidotlol/whoiser-cf.git","type":"git"},"_npmVersion":"10.9.2","description":"Whois info for domains, TLDs, IPs, and ASN in Cloudflare Workers","directories":{},"sideEffects":false,"_nodeVersion":"22.17.0","dependencies":{"punycode":"^2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.5.3","typescript":"^5.7.2","@types/node":"^22.10.2","@types/punycode":"^2.1.4","@cloudflare/workers-types":"^4.20250802.0"},"_npmOperationalInternal":{"tmp":"tmp/whoiser-cf_2.0.0-beta.7_1754131779575_0.7546624240423188","host":"s3://npm-registry-packages-npm-production"}},"2.0.0-beta.8":{"name":"@addidotlol/whoiser-cf","version":"2.0.0-beta.8","keywords":["whois","domain","tld","ip"],"author":{"name":"Andrei Igna","email":"andrei@laye.red"},"license":"MIT","_id":"@addidotlol/whoiser-cf@2.0.0-beta.8","maintainers":[{"name":"embedvr","email":"npm@helium.email"}],"contributors":[{"name":"Addison LeClair","email":"me@addi.lol"}],"homepage":"https://github.com/addidotlol/whoiser-cf#readme","bugs":{"url":"https://github.com/addidotlol/whoiser-cf/issues"},"dist":{"shasum":"a0cc496ce6c586b04b7c906e7f87e4610f4b3af8","tarball":"https://registry.npmjs.org/@addidotlol/whoiser-cf/-/whoiser-cf-2.0.0-beta.8.tgz","fileCount":11,"integrity":"sha512-xyKPtItWgHjvSyxKtuVrCCNUt/mXGZQ4Gk6qfm+mYcggTjSsoWoGPHPi9JUXQcxEb66wlPjgNchavAYbG2vk5Q==","signatures":[{"sig":"MEQCIFx7HkakpVtqsR7uWZ6d86iGm4jImg4yJ9zsp44gtsHgAiA8l9EQMFmujizltBovkDWIfdRwLjwq7FuD9fhRcKbM0g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49971},"type":"module","types":"./dist/whoiser.d.ts","exports":"./dist/whoiser.js","gitHead":"1eb0c4178ee07d97b0104caf8a6b7e5895a3102e","scripts":{"dev":"node --enable-source-maps --watch src/whoiser.ts","test":"node --test src/*.test.ts","build":"tsc","prettier":"prettier \"src/*.js\"","prettier:write":"npm run prettier -- --write"},"_npmUser":{"name":"embedvr","email":"npm@helium.email"},"repository":{"url":"git+ssh://git@github.com/addidotlol/whoiser-cf.git","type":"git"},"_npmVersion":"10.9.2","description":"Whois info for domains, TLDs, IPs, and ASN in Cloudflare Workers","directories":{},"sideEffects":false,"_nodeVersion":"22.17.0","dependencies":{"punycode":"^2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.5.3","typescript":"^5.7.2","@types/node":"^22.17.0","@types/punycode":"^2.1.4","@cloudflare/workers-types":"^4.20250802.0"},"_npmOperationalInternal":{"tmp":"tmp/whoiser-cf_2.0.0-beta.8_1754133123499_0.03680672549109065","host":"s3://npm-registry-packages-npm-production"}},"2.0.0-beta.9":{"name":"@addidotlol/whoiser-cf","version":"2.0.0-beta.9","keywords":["whois","domain","tld","ip"],"author":{"name":"Andrei Igna","email":"andrei@laye.red"},"license":"MIT","_id":"@addidotlol/whoiser-cf@2.0.0-beta.9","maintainers":[{"name":"embedvr","email":"npm@helium.email"}],"contributors":[{"name":"Addison LeClair","email":"me@addi.lol"}],"homepage":"https://github.com/addidotlol/whoiser-cf#readme","bugs":{"url":"https://github.com/addidotlol/whoiser-cf/issues"},"dist":{"shasum":"7bde87c7f6d50e210891f7c86e09bb474c7d166b","tarball":"https://registry.npmjs.org/@addidotlol/whoiser-cf/-/whoiser-cf-2.0.0-beta.9.tgz","fileCount":11,"integrity":"sha512-RyumNOumsEcMd6tI4lMfrC0FUeQ3uX4SXkUyS5xDtuvACcXpNihgSe8sjnW22lIOBcbSwHpptV3Peefs9/5NNA==","signatures":[{"sig":"MEUCID3850GA6GUkpjfo6G3l8wQCmpvyxymifq6nPKDNUzlYAiEAuyYUi5t0yGI4h3w/ROg4w4Gc26Ns/b5Necxa4HoLzjk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49603},"type":"module","types":"./dist/whoiser.d.ts","exports":"./dist/whoiser.js","gitHead":"1eb0c4178ee07d97b0104caf8a6b7e5895a3102e","scripts":{"dev":"node --enable-source-maps --watch src/whoiser.ts","test":"node --test src/*.test.ts","build":"tsc","prettier":"prettier \"src/*.js\"","prettier:write":"npm run prettier -- --write"},"_npmUser":{"name":"embedvr","email":"npm@helium.email"},"repository":{"url":"git+ssh://git@github.com/addidotlol/whoiser-cf.git","type":"git"},"_npmVersion":"10.9.2","description":"Whois info for domains, TLDs, IPs, and ASN in Cloudflare Workers","directories":{},"sideEffects":false,"_nodeVersion":"22.17.0","dependencies":{"punycode":"^2.1.1"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.5.3","typescript":"^5.7.2","@types/node":"^22.17.0","@types/punycode":"^2.1.4","@cloudflare/workers-types":"^4.20250802.0"},"_npmOperationalInternal":{"tmp":"tmp/whoiser-cf_2.0.0-beta.9_1754133204847_0.2992661992931227","host":"s3://npm-registry-packages-npm-production"}},"2.0.0-beta.10":{"name":"@addidotlol/whoiser-cf","version":"2.0.0-beta.10","description":"Whois info for domains, TLDs, IPs, and ASN in Cloudflare Workers","type":"module","keywords":["whois","domain","tld","ip"],"author":{"name":"Andrei Igna","email":"andrei@laye.red"},"contributors":[{"name":"Addison LeClair","email":"me@addi.lol"}],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/addidotlol/whoiser-cf.git"},"homepage":"https://github.com/addidotlol/whoiser-cf#readme","exports":"./dist/whoiser.js","types":"./dist/whoiser.d.ts","sideEffects":false,"scripts":{"build":"tsc","dev":"node --enable-source-maps --watch src/whoiser.ts","prettier":"prettier \"src/*.js\"","prettier:write":"npm run prettier -- --write","test":"node --test src/*.test.ts"},"dependencies":{"punycode":"^2.1.1"},"devDependencies":{"@cloudflare/workers-types":"^4.20250802.0","@types/node":"^22.17.0","@types/punycode":"^2.1.4","prettier":"^3.5.3","typescript":"^5.7.2"},"_id":"@addidotlol/whoiser-cf@2.0.0-beta.10","gitHead":"1eb0c4178ee07d97b0104caf8a6b7e5895a3102e","bugs":{"url":"https://github.com/addidotlol/whoiser-cf/issues"},"_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-CC6+7LRmoZUASk8rajiQqerdrMfr4GSg1r/K4TRE1E3KS6yVqSCW2L2eRAHD4PzMd5e6LpPB1V7c05R3EWjf/g==","shasum":"7d72d42781700147f88b308e7dbcece3efd79dd1","tarball":"https://registry.npmjs.org/@addidotlol/whoiser-cf/-/whoiser-cf-2.0.0-beta.10.tgz","fileCount":11,"unpackedSize":49849,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCUMcLx0Jx8gKr5WFio4IysmwYAVtPui/C0omVWjAYckgIhAPqkIIgAnQh2UGjmQNyo6UIvywBHJz12YxV20egAKpaj"}]},"_npmUser":{"name":"embedvr","email":"npm@helium.email"},"directories":{},"maintainers":[{"name":"embedvr","email":"npm@helium.email"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/whoiser-cf_2.0.0-beta.10_1754134983027_0.31902122211535056"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-02T10:49:39.486Z","modified":"2025-08-02T11:43:03.446Z","2.0.0-beta.7":"2025-08-02T10:49:39.779Z","2.0.0-beta.8":"2025-08-02T11:12:03.681Z","2.0.0-beta.9":"2025-08-02T11:13:25.027Z","2.0.0-beta.10":"2025-08-02T11:43:03.222Z"},"bugs":{"url":"https://github.com/addidotlol/whoiser-cf/issues"},"author":{"name":"Andrei Igna","email":"andrei@laye.red"},"license":"MIT","homepage":"https://github.com/addidotlol/whoiser-cf#readme","keywords":["whois","domain","tld","ip"],"repository":{"type":"git","url":"git+ssh://git@github.com/addidotlol/whoiser-cf.git"},"description":"Whois info for domains, TLDs, IPs, and ASN in Cloudflare Workers","contributors":[{"name":"Addison LeClair","email":"me@addi.lol"}],"maintainers":[{"name":"embedvr","email":"npm@helium.email"}],"readme":"# 🌍 Whoiser-CF\n\n**whoiser-cf** is a WHOIS client for Cloudflare Workers that helps with querying WHOIS servers for TLDs, domain names, AS numbers and IPs.\n\nThis is a fork of [whoiser](https://github.com/LayeredStudio/whoiser) (v2) by [LayeredStudio](https://github.com/LayeredStudio).\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> [!CAUTION]\n> v2 is under active development! The code in `main` branch is for v2. Breaking changes:\n> - ESM only\n> - removed `whoiser()` method, use individual `whoisDomain`, `whoisTld`, `whoisIp`, `whoisAsn`\n> - removed `allTlds()`\n>\n> 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 @addidotlol/whoiser-cf```\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<Object<whoisServer>>`\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 () => {\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<Object>`\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 () => {\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<Object>`\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 () => {\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 -> `whoiser.query()`\n- [x] query whois for TLDs with parsed result -> `whoiser.tld()`\n- [x] query whois for domains with parsed result -> `whoiser.domain()`\n- [x] query whois for IPs and return parsed result -> `whoiser.ip()`\n- [x] query whois for ASN with parsed result -> `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","readmeFilename":"README.md"}