@cleandns/whois-rdap

中文文档
1.0.60发布于 2026/06/17ISCTypeScriptES Module近 30 天下载 1722

WHOIS/RDAP lookups for domain names.

原始使用文档
文档目录8 节
  1. Documentation
  2. whois(target: string, options?: WhoisParameters): Promise<W…
  3. Parameters
  4. Returns
  5. WhoisResponse
  6. Example
  7. Installation
  8. Caveats / limitations

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.

版本与发布记录

@cleandns/whois-rdap 共发布 49 个版本,首次发布于 2024/04/03;过去 12 个月发布了 3 个版本。

版本发布日期距今
1.0.60latest2026/06/174 个月前
1.0.572026/01/219 个月前
1.0.552026/01/209 个月前
1.0.522025/10/151.1 年前
1.0.512025/10/021.1 年前
1.0.502025/08/271.2 年前

关于 @cleandns/whois-rdap 的常见问题

@cleandns/whois-rdap 是什么?

WHOIS/RDAP lookups for domain names.

如何安装 @cleandns/whois-rdap?

在项目目录运行 npm install @cleandns/whois-rdap,或使用 pnpm add / yarn add / bun add。

@cleandns/whois-rdap 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cleandns/whois-rdap 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cleandns/whois-rdap 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cleandns/whois-rdap 可以商用吗?

@cleandns/whois-rdap 使用 ISC 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cleandns/whois-rdap 的下载量有多少?

根据 npm 官方下载统计,@cleandns/whois-rdap 在 2026/10/10 – 2026/11/08 这 30 天内被下载 1,722 次,日均约 57 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cleandns/whois-rdap 还在维护吗?

最新版本 1.0.60 发布于 2026/06/17(4 个月前);至今共发布 49 个版本,其中过去 12 个月发布了 3 个;首次发布于 2024/04/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。