Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

whois-api-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whois-api-js

Whois API client for Node.js

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

whois-api-js licence whois-api-js release whois-api-js build

Overview

Node.js client library for Whois API.

Minimum Node.js version is 10.

Installation

The library is distributed via npm

npm install whois-api-js

Examples

Full API documentation available here

Create a new client

const WhoisApi = require('whois-api-js')

const client = new WhoisApi.Client('Your API Key')

Make basic requests

client.get('example.com')
  .then(function (data) {
    console.log(data)
  })
  .catch(function (error) {
    console.log(error)
  })

Additional parameters

// Check domain availability, fetch Whois proxy data & skip raw text
const params = new WhoisApi.RequestParameters({
  da: 1,
  checkProxyData: 1,
  ignoreRawTexts: 1
})

// Fetch results in XML
client.getRaw('example.com', WhoisApi.XML_FORMAT, params)
  .then(function (data) {
    console.log(data)
  })
  .catch(function (error) {
    console.log(error)
  })

Using callback

client.get('example.com', params, function (err, res) {
  if (err) {
    console.log(err)
  } else {
    console.log(res)
  }
})

Changelog

1.0.0: 02-07-2022

  • First release.

Keywords

FAQs

Package last updated on 06 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc