Check out the availability of a list of domains.
Do you want to know if a domain .com is available? With this script, you can find out the availability of a domain or a list of domains, saved in a JSON file or a text file.
I've also created a Telegram bot with Python, called @CheckDomainAPI_bot, that does the same thing of CheckDomain.py script. You can text to it the domain to check it out. I use AWS to host the bot.
This script is created with:
- Python, if you are using Windows, add it to the PATH (guide)
- requests and json modules. You can easily download with
pip install requests
andpip install ijson
(if ijson does not work, use jsonlib) - GoDaddy API Keys
-
Create a GoDaddy account to get the API Keys needed.
-
Insert them into the file credentials.py.
-
Edit the file domains.txt with the list of domains that you want to check out (don't add .com, but only write the name of the website).
-
Run the script, using
python CheckDomain.py
, in the terminal. After that, the script asks you which file to open, with the command line:choice = int(input("Text file [1] or Json file [2]? "))
-
The script opens the file and reads the domains' name and for each domain it executes a request get, one by one, throught the GoDaddy API.
-
If the domain is available, it will save in a text file, called AvailableWebsites.txt, with the command line:
f = open('AvailableWebsites.txt', 'w')
f.write(name+'.com is available\r\n')
Sometimes GoDaddy API doesn't work and it says that a domain is avalaible when it's not and I don't know why. To check if the domain is available, click the link that the script sends to you.