Skip to main content

IPData.info Python SDK — Free IP Geolocation & Threat Intelligence API

PyPI CI License: MIT

Official Python client for ipdata.info — a free, fast IP geolocation, ASN, and threat-intelligence API. Look up country, city, ASN, timezone, currency, and security flags (proxy/VPN/Tor/hosting) for any IPv4 or IPv6 address. Powered by ipdata.info.

Get a free API key

The public endpoint is free — 50 requests/min, no signup, no key. For higher rate limits and batch lookups, create a free API key at ipdata.info/register and manage it in your dashboard.

Install

pip install ipdatainfo

Quickstart

from ipdatainfo import Client

# Free tier — no API key needed. For higher limits + batch, get a free key
# at https://ipdata.info/register and use Client(api_key="...").
client = Client()

info = client.lookup("8.8.8.8")
print(info.city, info.country, info.asn_org)  # Mountain View United States Google LLC

Methods

Method What it returns
lookup(ip="") Full geolocation record (own IP if omitted)
geo(ip) Geo subset (city/region/country/lat/lon/tz)
asn(ip) ASN + ISP/registry for an IP
batch(ips) Many IPs at once (requires an API key)
asn_detail(n) ASN detail incl. prefixes
asn_whois_history(n) ASN whois history
asn_changes() ASN change feed
threat_domain/threat_hash/threat_url(x) Threat-intel lookup (domain / file hash / URL)

Full response schema: ipdata.info API docs · SDK contract.

Configuration

from ipdatainfo import Client

client = Client(
    api_key="KEY",                        # sent as X-Api-Key; switches to pro.ipdata.info
    base_url="https://ipdata.info",       # override the host
    timeout=10.0,                          # seconds
)

Errors from non-2xx responses are raised as ipdatainfo.IpDataError with .status and .message.

Rate limits

  • Free (ipdata.info): 50 req/min, no key.
  • Paid (pro.ipdata.info): higher limits + batch, with an API key.

Other SDKs

12 official SDKs — see the full list at ipdata.info/docs/sdks: Python, Node.js, Go, PHP, Java, Rust, .NET, Kotlin, Swift, Dart, Bash, Objective-C.

License

MIT © ipdata.info

Metadata

Release files for ipdatainfo 0.1.0

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

Source distribution (sdist)

Source distribution for ipdatainfo 0.1.0
File Size Uploaded
ipdatainfo-0.1.0.tar.gz 9.8 kB Details

Built distribution (wheel)

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

Total release size: 18.1 kB

Release files / ipdatainfo-0.1.0.tar.gz

Download URL ipdatainfo-0.1.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
68f8a8afd5ec4d00c9adfd57357d23b9f5d7a7dabcddc89bcac38fc29da24738
BLAKE2b-256 checksum
How to use checksums
e7fb02ec236ff580102b45571b48b423e7b67a4fa5f352f80b095a13919ad7a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / ipdatainfo-0.1.0-py3-none-any.whl

Download URL ipdatainfo-0.1.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6d26a95dd852f22bfd00a3b1f28952f39accc1713279e48a054c62ed2a36796
BLAKE2b-256 checksum
How to use checksums
ed6235e937fb9bec52888550102ff84f12143b6c457b8ea2a075e144b4333e45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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