npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

check-domain

v1.1.8

Published

A simple component to check the status of a domain (whois, availability, expired, TrustFlow, number of indexed pages, ...)

Downloads

68

Readme

Retrieve informations about one domain:

  • IP adress
  • DNS resolution
  • Ping
  • domains on the same ip
  • Backlinks, Truts Flow, Citation Flow and other metrics provided by the Majestic API.
  • Availability provided by whoisxmlapi.com
  • Whois data provided by whoisxmlapi.com + 4 extra info : isValidDomain, isPendingDelete, isRedemptionPeriod, missingData (if no whois found)
  • Semrush info (rank, number of organic keywords, organic traffic size : '6070', number of adwords keywords, adwords traffic)
  • number of pages indexed by Google (primary & secondary index)

In order to get all info, you need to provide your majestic API key, your whoisxmlapi credential & your Semrush API key. Without those setting, it returns only dns resolution, ip, ping & indexed pages.

We plan to support other APIs notably for the whois data. Feel free to suggest your favorite ones.

Install

$ npm install check-domain --save

Crash course

var checkDomain = require("check-domain");

var options = {
  domain : "domainToCheck.com",
  majesticKey : "[add here your majestic key]",
  whois : {user : "[your whoisxmlapi name]", password : "[your whoisxmlapi password]"},
  semrushKey : "[add here your semrush key]",

};

checkDomain(options,
  function(error, result) {
        console.log(result); // see the complete result structure
        console.log(result.isDNSFound);
        console.log(result.ip);
        console.log(result.isAlive);
        console.log(result.isAvailable);
        console.log(result.majestic); // see the json structure provided by http://developer-support.majestic.com/api/commands/get-index-item-info.shtml
        console.log(result.whois);    // see the json structure provided by http://www.whoisxmlapi.com

        console.log(result.semrush); // The Semrush datas

        console.log(result.primaryIndex);
        console.log(result.googleIndex);
        console.log(result.secondaryIndex);


        // We add extra fields in the whois structure
        console.log(result.whois.isValidDomain);
        console.log(result.whois.missingData);  // The whois database doesn't contain info for this domain
        console.log(result.whois.isPendingDelete);
        console.log(result.whois.isRedemptionPeriod);
        console.log(result.whois.createdDate);
        console.log(result.whois.expiresDate);
        console.log(result.whois.expiredWaitingTime);


  });

The complete option list

The options object (see below) can contain the following parameters. Depending your use case, there are some options that can help to avoid an unnecessary cost for some APIs.

  • domain : String. The domain to check.
  • majesticKey : String. The majestic API key. Optional.
  • whois : object {user (String), password (String)}. The Whoisxmlapi credential. Optional.
  • semrushKey : String. The semrush API Key. Optional.
  • semrushDB : String. If not defined, the semrush DB will match to the domain tld.
  • noCheckIfDNSResolve : Boolean. If true, the API datas (Majestic, Semrush, whois) are not retrieved if there is a correct DNS resolution for this domain.
  • minTrustFlow : Number. The minTrustFlow to get the whois, semrush & availability data.
  • proxyList : Object. List of proxies to used (see npm module : simple-proxies). Proxies are used only for Google request. Optional.
  • googleHost : String. if not defined, the google host will be match to the domain tld or by default google.com. Optional.
  • noCheckGoogleIndex : Boolean. If true, the google data (number of indexed pages) are not retrieved.