Skip to main content

Official Python client for the ipdata.info IP geolocation, ASN, and threat-intelligence API

Project description

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

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

ipdatainfo-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipdatainfo-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file ipdatainfo-0.1.0.tar.gz.

File metadata

  • Download URL: ipdatainfo-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ipdatainfo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68f8a8afd5ec4d00c9adfd57357d23b9f5d7a7dabcddc89bcac38fc29da24738
MD5 45e18a0d15872d4c32e822c86f3edb26
BLAKE2b-256 e7fb02ec236ff580102b45571b48b423e7b67a4fa5f352f80b095a13919ad7a1

See more details on using hashes here.

File details

Details for the file ipdatainfo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ipdatainfo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for ipdatainfo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6d26a95dd852f22bfd00a3b1f28952f39accc1713279e48a054c62ed2a36796
MD5 f90fb21b538a393f8a95213c5786bef1
BLAKE2b-256 ed6235e937fb9bec52888550102ff84f12143b6c457b8ea2a075e144b4333e45

See more details on using hashes here.

Supported by

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