Skip to main content

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 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)

Response Parameter

Lookup function

Parameter Type Description
domain string Domain name.
domain_id string Domain name ID.
status string Domain name status.
create_date string Domain name creation date.
update_date string Domain name updated date.
expire_date string Domain name expiration date.
domain_age integer Domain name age in day(s).
whois_server string WHOIS server name.
registrar.iana_id string Registrar IANA ID.
registrar.name string Registrar name.
registrar.url string Registrar URL.
registrant.name string Registrant name.
registrant.organization string Registrant organization.
registrant.street_address string Registrant street address.
registrant.city string Registrant city.
registrant.region string Registrant region.
registrant.zip_code string Registrant ZIP Code.
registrant.country string Registrant country.
registrant.phone string Registrant phone number.
registrant.fax string Registrant fax number.
registrant.email string Registrant email address.
admin.name string Admin name.
admin.organization string Admin organization.
admin.street_address string Admin street address.
admin.city string Admin city.
admin.region string Admin region.
admin.zip_code string Admin ZIP Code.
admin.country string Admin country.
admin.phone string Admin phone number.
admin.fax string Admin fax number.
admin.email string Admin email address.
tech.name string Tech name.
tech.organization string Tech organization.
tech.street_address string Tech street address.
tech.city string Tech city.
tech.region string Tech region.
tech.zip_code string Tech ZIP Code.
tech.country string Tech country.
tech.phone string Tech phone number.
tech.fax string Tech fax number.
tech.email string Tech email address.
billing.name string Billing name.
billing.organization string Billing organization.
billing.street_address string Billing street address.
billing.city string Billing city.
billing.region string Billing region.
billing.zip_code string Billing ZIP Code.
billing.country string Billing country.
billing.phone string Billing phone number.
billing.fax string Billing fax number.
billing.email string Billing email address.
nameservers array Name servers
{
  "domain": "greendot.com",
  "domain_id": "600750_DOMAIN_COM-VRSN",
  "status": "clientTransferProhibited http://www.icann.org/epp#clientTransferProhibited",
  "create_date": "1997-11-03T00:00:00Z",
  "update_date": "2021-10-29T01:13:27Z",
  "expire_date": "2023-11-02T05:00:00Z",
  "domain_age": 9319,
  "whois_server": "whois.corporatedomains.com",
  "registrar": {
    "iana_id": "299",
    "name": "CSC CORPORATE DOMAINS, INC.",
    "url": "www.cscprotectsbrands.com"
  },
  "registrant": {
    "name": "Admin Role",
    "organization": "Green Dot Corporation",
    "street_address": "3465 E. Foothill Blvd",
    "city": "Pasadena",
    "region": "CA",
    "zip_code": "91107",
    "country": "US",
    "phone": "+1.8664120548",
    "fax": "+1.8664120548",
    "email": "adminrole@greendotcorp.com"
  },
  "admin": {
    "name": "Admin Role",
    "organization": "Green Dot Corporation",
    "street_address": "3465 E. Foothill Blvd",
    "city": "Pasadena",
    "region": "CA",
    "zip_code": "91107",
    "country": "US",
    "phone": "+1.8664120548",
    "fax": "+1.8664120548",
    "email": "adminrole@greendotcorp.com"
  },
  "tech": {
    "name": "Admin Role",
    "organization": "Green Dot Corporation",
    "street_address": "3465 E. Foothill Blvd",
    "city": "Pasadena",
    "region": "CA",
    "zip_code": "91107",
    "country": "US",
    "phone": "+1.8664120548",
    "fax": "+1.8664120548",
    "email": "adminrole@greendotcorp.com"
  },
  "billing": {
    "name": "",
    "organization": "",
    "street_address": "",
    "city": "",
    "region": "",
    "zip_code": "",
    "country": "",
    "phone": "",
    "fax": "",
    "email": ""
  },
  "nameservers": [
    "dexter.ns.cloudflare.com",
    "aliza.ns.cloudflare.com"
  ]
}

LICENCE

See the LICENSE file.

Metadata

Release files for IP2WHOIS 2.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for IP2WHOIS 2.2.5
File Size Uploaded
ip2whois-2.2.5.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for IP2WHOIS 2.2.5
File Interpreter ABI Platform
IP2WHOIS-2.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 24.9 kB

Release files / ip2whois-2.2.5.tar.gz

Download URL ip2whois-2.2.5.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fedce0038df7f3dfcd3b4205669e7f1b0f6331d1beeea72cab23955188a2b92d
BLAKE2b-256 checksum
How to use checksums
c62eeab66e474ab7fd5d00273ce15604b10d9ece5c82ad6fa632eaacb2f73560
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / IP2WHOIS-2.2.5-py3-none-any.whl

Download URL IP2WHOIS-2.2.5-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8b088dd5663f845ee7e1fa634deb07e1255dc0996ceba1e85d100617c0827c0
BLAKE2b-256 checksum
How to use checksums
4b481261c824c8bfae84dc32f7b4ddb8e9140dd4d84349d7bbba1881c7ed9a0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

2.2.5 This release

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page