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.

Metadata

Release files for ipgeolocateio 1.0.3

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

Source distribution (sdist)

Source distribution for ipgeolocateio 1.0.3
File Size Uploaded Provenance Actions
ipgeolocateio-1.0.3.tar.gz 5.0 kB With provenance Details for ipgeolocateio-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 9.2 kB

Release files / ipgeolocateio-1.0.3.tar.gz

Download URL ipgeolocateio-1.0.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e83b7a276ccad3ff2091fad115add166ad765c7869ad3d8807a554028dc68464
BLAKE2b-256 checksum
How to use checksums
5db6feda8f85b2c4829277c62ab9719875bd8cfcf51210a31cd5d675999a82ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Release files / ipgeolocateio-1.0.3-py3-none-any.whl

Download URL ipgeolocateio-1.0.3-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa72e3a976c97a6c27c94755a6af67615b0c9713d0bcfe2a8e027a8f991d1deb
BLAKE2b-256 checksum
How to use checksums
4822e57f53d45ff6541236142e5796fec0e9bc3b3a8c4a3807f0657a7d14d636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

Security for ipgeolocateio 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ipgeolocateio-1.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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