# async-whois-dns

> Async rdap, whois and dns lookup for node.js using promises. Works with AWS Lambda.

Latest version **1.4.0** (published 2024-07-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install async-whois-dns
pnpm add async-whois-dns
yarn add async-whois-dns
bun add async-whois-dns
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2024-07-26 |
| First published | 2023-09-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 35 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Simone Sardelli |
| Maintainers | aknazu |
| Keywords | whois, digdns, serverless, rdap, digmx, lambda, digtxt, reverse ip |

## Links

- npm: https://www.npmjs.com/package/async-whois-dns
- npm.io page: https://npm.io/package/async-whois-dns

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7

## Recent versions

- 1.4.0 (latest) — 2024-07-26
- 1.3.0 — 2024-01-29
- 1.2.8 — 2024-01-29
- 1.2.7 — 2023-11-07
- 1.2.6 — 2023-10-30
- 1.2.5 — 2023-10-30
- 1.2.4 — 2023-10-30
- 1.2.3 — 2023-10-30
- 1.2.2 — 2023-10-30
- 1.2.1 — 2023-10-30
- 1.2.0 — 2023-10-28
- 1.1.4 — 2023-10-28
- 1.1.3 — 2023-10-28
- 1.1.2 — 2023-10-27
- 1.1.1 — 2023-10-27
- … 8 more at https://npm.io/package/async-whois-dns/versions

## README

# async-whois-dns

**Makes WHOIS, dig ns, low-level RDAP calls to be available in environments without bash commands (example AWS Lambda)**


```javascript
import asyncWhois from "async-whois-dns";

const result = await asyncWhois.whois(
  // This should be a string with basic latin letters only.
  "www.some.example.co.uk"
);
```

## Installation

```sh
npm install async-whois-dns
```

## Methods
<h3 id="api-js-fromUrl">
🧩 <code>rdap(input: string)</code>
</h3>

```javascript
import asyncWhois from "async-whois-dns";

const result = await asyncWhois.rdap(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk" OR "192.168.1.1"
);
```
Takes a URL string or IP and tries to recover the whois information with RDAP. If failed try the whois


<h3 id="api-js-fromUrl">
🧩 <code>digNs(input: string)</code>
</h3>

```javascript
import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digNs(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk"
);
```
Takes a URL string and tries to recover the Name Server.

<h3 id="api-js-fromUrl">
🧩 <code>digMx(input: string)</code>
</h3>

```javascript
import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digMx(
    // This should be a string with basic latin letters only.
    "example.com"
);
```
Takes a URL string and tries to recover the MX Server.

<h3 id="api-js-fromUrl">
🧩 <code>digTxt(input: string)</code>
</h3>

```javascript
import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digTxt(
    // This should be a string with basic latin letters only.
    "example.com"
);
```
Takes a URL string and tries to recover the TXT Server.

<h3 id="api-js-fromUrl">
🧩 <code>ipResolver(input: string)</code>
</h3>

```javascript
import asyncWhois from "async-whois-dns";

const result = await asyncWhois.ipResolver(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk"
);
```
Takes a URL string and tries to recover the IP address associated with it.



## License

MIT

---
_Source: https://npm.io/package/async-whois-dns · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
