Domain availability check use case.
There is a very useful online service for web developers and SEO professionals on "WhoisXML API" that
provides Domain & IP Data Intelligence for Greater Enterprise Security.
Using it's APIs you can perform many handy data requests, for example check domain availability for website you plan to build. You will need to register and get your personal API key.
Python Knowledge Base: Make coding great again.
- Updated:
2024-11-20 by Andrey BRATUS, Senior Data Analyst.
This Python script below will use information from "WhoisXML API" and present it in text form without the need to use a web browser.
Chosing your future websites name is easy now !
Python code to check websites' domain availability:
pip install domain-availability
from domainavailability import *
client = Client('at_ZUVkrukr4Uhhhsfq2j6dyv2VhFGWYV')
# Get parsed records as a model instance.
result = client.data('python-code.pro')
print(result.domain_availability)
if result.is_available() is True:
print('This domain name is available.')
# Get raw API response
raw_result = client.raw_data('python-code.pro')
raw_result
OUT:
UNAVAILABLE
{"DomainInfo":{"domainAvailability":"UNAVAILABLE","domainName":"python-code.pro"}}