Check domain availability without third-party service
Asked Answered
C

1

6

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 ?

Cecilia answered 12/5, 2020 at 8:34 Comment(1)
"it's possible to check the availability of a domain using Node.js" The only public open interface to do that is by querying the registries whois servers, or better RDAP. Otherwise registrars have real time availability checks possible to the registry through a non public protocol (EPP) but many of them provide an API for resellers that you can leverage. And registrars do not reserve names, registries do (in which case it may be written in the whois output, or not).Maribeth
S
1

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

Shanahan answered 13/5, 2020 at 5:9 Comment(2)
Thanks for the answer but I wanted to solve this withouot a third-party API. I have found this node.js library which seems to be quite accurate: github.com/LayeredStudio/whoiserCecilia
"You will have to find a service that lets you perform WHOIS lookups using API." No need to do that, just connect to registries whois servers.Maribeth

© 2022 - 2024 — McMap. All rights reserved.