Skip to main content

ipgeolocationapi

Zero-dependency Python client for ipgeolocationapi.io, the free IP geolocation API. Stdlib only, Python 3.9+.

Install

pip install ipgeolocateio

Quickstart (free tier, no key)

from ipgeolocateio import Client

c = Client()
geo = c.lookup("8.8.8.8")
print(geo["country"], geo["connection"]["asn"], geo["timezone"]["id"])

The free tier works with no API key: 5,000 requests/day, no signup.

Paid features

c = Client("ipa_YOUR_KEY")   # from https://ipgeolocationapi.io/dashboard

c.security("1.1.1.1")        # VPN / proxy / Tor verdicts + threat score
c.asn(13335)                 # autonomous system lookup
c.timezone_convert("America/New_York", "Asia/Tokyo")
c.astronomy(lat=52.52, lon=13.405)   # sunrise, golden hour, moon
c.bulk(["8.8.8.8", "1.1.1.1"])

Error handling

from ipgeolocationapi import RateLimitError, PlanError

try:
    geo = c.lookup("10.0.0.1")
except PlanError:
    ...   # endpoint needs a paid plan
except RateLimitError as e:
    ...   # e.retry_after seconds until the window resets

API surface

Method Endpoint
lookup(ip, fields, excludes, lang, security) GET /{ip or domain}
asn(number) GET /asn?asn=
timezone_convert(from, to, time) GET /timezone/convert
astronomy(ip, lat, lon, date) GET /astronomy
useragent(ua) GET /useragent
abuse(ip) GET /abuse
bulk(ips, fields) POST /bulk

Full docs: https://ipgeolocationapi.io/docs · OpenAPI 3.1: https://ipgeolocationapi.io/openapi.json

MIT License.

Download files

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

Source Distribution

ipgeolocateio-1.0.3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

ipgeolocateio-1.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file ipgeolocateio-1.0.3.tar.gz.

File metadata

  • Download URL: ipgeolocateio-1.0.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ipgeolocateio-1.0.3.tar.gz
Algorithm Hash digest
SHA256 e83b7a276ccad3ff2091fad115add166ad765c7869ad3d8807a554028dc68464
MD5 f3b22a0d2027801deebcbd08f736c6d8
BLAKE2b-256 5db6feda8f85b2c4829277c62ab9719875bd8cfcf51210a31cd5d675999a82ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipgeolocateio-1.0.3.tar.gz:

Publisher: pypi-publish.yml on thebigasif/ipgeolocationapi-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ipgeolocateio-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: ipgeolocateio-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ipgeolocateio-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa72e3a976c97a6c27c94755a6af67615b0c9713d0bcfe2a8e027a8f991d1deb
MD5 e88e935c231becdee1da2bbd750d3bd6
BLAKE2b-256 4822e57f53d45ff6541236142e5796fec0e9bc3b3a8c4a3807f0657a7d14d636

See more details on using hashes here.

Provenance

The following attestation bundles were made for ipgeolocateio-1.0.3-py3-none-any.whl:

Publisher: pypi-publish.yml on thebigasif/ipgeolocationapi-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 files

1.0.2

2 files

1.0.0

2 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