Bruno Crosier
Bruno Crosier

Reputation: 758

Check domain availability without third-party service

I am aware that there exist some premium APIs for this, but I would like to know whether it's possible to check the availability of a domain using Node.js

So far, I have managed to achieve 95% accuracy by using url.resolveAny() to check whether any DNS records exist for the domain. However, sometimes a domain may be registered without having any DNS records, and sometimes a domain may be "reserved" by the registrar (and therefore unavailable for purchase).

Does anyone have any suggestions for how to check the availability of a domain more accurately ?

Upvotes: 6

Views: 7307

Answers (1)

madacoda
madacoda

Reputation: 404

Using DNS queries is going to be guesswork.

  • As you said, domains can just be reserved.

  • Domains can also be valid without having any records at the apex.

  • They might only be used for the subdomains, etc.

You will have to find a service that lets you perform WHOIS lookups using API.

Here is a popular one I found via a quick search : https://domain-availability.whoisxmlapi.com/api

Upvotes: 1

Related Questions