The client library for Domain Availability API in Python language.
The minimum Python version is 3.6.
pip install domain-availability
Full API documentation available here
from domainavailability import *
client = Client('Your API key')
# Get parsed records as a model instance.
result = client.data('whoisxmlapi.com')
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('whoisxmlapi.com')
Extra request parameters
result = client.data(
'whoisxmlapi.com',
mode=Client.DNS_AND_WHOIS_MODE,
credits_type=Client.DOMAIN_AVAILABILITY_CREDITS)
raw_result = client.raw_data(
'whoisxmlapi.com',
mode=Client.DNS_ONLY_MODE,
credits_type=Client.WHOIS_CREDITS,
output_format=Client.XML_FORMAT)