ipwhois
Retrieve and parse whois data for IPv4 and IPv6 addresses.
What it is and what it does
ipwhois is a Python library for querying whois and RDAP registries to retrieve network ownership and registration data for IP addresses. It supports both IPv4 and IPv6, with a focus on parsing regional internet registry responses into a standard dictionary format. The library can query via RDAP (the modern HTTP-based protocol, recommended), legacy whois protocol, or national internet registries for Japan and South Korea. It also includes ASN (Autonomous System Number) lookup functionality and a command-line interface.
The package depends on dnspython for DNS queries, defusedxml for secure XML parsing, and ipaddr (Python 2.7 only). It handles network recursion for parent/child relationships and supports proxy configuration for RDAP queries. Rate limiting is a known constraint, particularly when multiple users share a source IP or when querying LACNIC. The library is stable and widely used but has not been actively developed recently.
Use it for:
- Look up network ownership and contact details for an IP address to identify the responsible organization.
- Retrieve ASN information and origin data for IP addresses in network monitoring or security workflows.
- Parse whois data for bulk IP analysis using experimental bulk query support (with caution on rate limits).
- Query national internet registries for IP addresses in Japan or South Korea where regional data is restricted.
- Build CLI tools or scripts that need human-readable whois output with optional ANSI colored formatting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Retrieves and parses whois and RDAP data for IPv4 and IPv6 addresses, returning standardized dictionaries of network registration information.
Yes, for IP whois lookups. The package is stable, permissively licensed, and has low install friction. Dormant maintenance is a minor concern for a mature utility library, but the codebase is production-ready and no active vulnerabilities are known. Install only if you need whois/RDAP data; be aware of rate limiting constraints and firewall port requirements.
Install
ipwhois on PyPI
pip
pip install ipwhoisuv
uv add ipwhoispoetry
poetry add ipwhoisInstalling ipwhois
Before you install
Low install friction with three lightweight runtime dependencies. Maintenance is dormant (668 days since last release), though the package reached stable status and the repository remains active with no archived flag.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions, typical for established network utility libraries.
Quickstart
pip install ipwhois
from ipwhois import IPWhois
obj = IPWhois('8.8.8.8')
results = obj.lookup_rdap()
print(results)
Requires outbound firewall access to ports 43/tcp (whois), 53/tcp (DNS), and 80/tcp (HTTP) for lookups to succeed; rate limiting by source IP may cause latency.
Verify before relying
- Whether Python 2.7 support is still actively tested or maintained given the dormant status.
- Current behavior and reliability of experimental bulk query support introduced in v1.0.0.
- Whether LACNIC rate limiting remains a practical issue for typical usage patterns.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — dnspython, defusedxml, ipaddr |
| Maintenance | dormant — 668 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 615,355/month — #5,742 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ipwhois-1.3.0-py2.py3-none-any.whl
Keywords: Python, WHOIS, RWhois, Referral Whois, ASN, IP Address, IP, IPv4, IPv6, IETF, REST, Arin, Ripe, Apnic, Lacnic, Afrinic, NIC, National Information, Center, RDAP, RIR, Regional Internet Registry, NIR, National Internet, Registry, ASN origin, Origin
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
censysA Python wrapper for Censys APIs that lets you…
permissive · top 15,000 on PyPI
whoisitQuery RDAP (Registration Data Access Protocol)…
unclear · top 15,000 on PyPI
yargYarg is a PyPI client library that queries…
permissive · top 5,000 on PyPI
nslookupProvides high-level DNS lookups (A, AAAA, and…
copyleft · top 15,000 on PyPI
python-whoisQueries WHOIS servers directly to retrieve and…
permissive · top 5,000 on PyPI
whoisRetrieves WHOIS information for domain names by…
permissive · top 15,000 on PyPI
IP2LocationLooks up geolocation data (country, region,…
permissive · top 15,000 on PyPI
shodanProvides Python access to Shodan's search…
permissive · top 15,000 on PyPI
geoip2fastGeoIP2Fast performs fast geolocation lookups…
permissive · top 15,000 on PyPI
IPyIPy provides Python classes for parsing,…
permissive · top 5,000 on PyPI