Skip to main content

IP2WHOIS Python SDK to help user to check WHOIS information for a particular domain.

Project description

IP2WHOIS Python SDK

This Python module enables user to easily implement the checking of WHOIS information for a particular domain into their solution using the API from https://www.ip2whois.com. It is a WHOIS lookup api that helps users to obtain domain information, WHOIS record, by using a domain name. The WHOIS API returns a comprehensive WHOIS data such as creation date, updated date, expiration date, domain age, the contact information of the registrant, mailing address, phone number, email address, nameservers the domain is using and much more. IP2WHOIS supports the query for 1113 TLDs and 634 ccTLDs.

This module requires API key to function. You may sign up for a free API key at https://www.ip2whois.com/register.

Installation

To install this module type the following:

pip install IP2WHOIS

Usage Example

Lookup Domain Information

import ip2whois

# Configures IP2WHOIS API key
ip2whois_init = ip2whois.Api('YOUR_API_KEY')

# Lookup domain information
results = ip2whois_init.lookup('example.com')
print(results)

Convert Normal Text to Punycode

import ip2whois

# Configures IP2WHOIS API key
ip2whois_init = ip2whois.Api('YOUR_API_KEY')


# Convert normal text to punycode
result = ip2whois_init.getPunycode('täst.de')
print(result)

Convert Punycode to Normal Text

import ip2whois

# Configures IP2WHOIS API key
ip2whois_init = ip2whois.Api('YOUR_API_KEY')


# Convert punycode to normal text
result = ip2whois_init.getNormalText('xn--tst-qla.de')
print(result)

Get Domain Name

import ip2whois

# Configures IP2WHOIS API key
ip2whois_init = ip2whois.Api('YOUR_API_KEY')


# Get domain name from URL
result = ip2whois_init.getDomainName('https://www.example.com/exe')
print(result)

Get Domain Extension

import ip2whois

# Configures IP2WHOIS API key
ip2whois_init = ip2whois.Api('YOUR_API_KEY')


# Get domain extension (gTLD or ccTLD) from URL or domain name
result = ip2whois_init.getDomainExtension('example.com')
print(result)

LICENCE

See the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

IP2WHOIS-2.2.0.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

IP2WHOIS-2.2.0-py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page