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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e83b7a276ccad3ff2091fad115add166ad765c7869ad3d8807a554028dc68464
|
|
| MD5 |
f3b22a0d2027801deebcbd08f736c6d8
|
|
| BLAKE2b-256 |
5db6feda8f85b2c4829277c62ab9719875bd8cfcf51210a31cd5d675999a82ac
|
Provenance
The following attestation bundles were made for ipgeolocateio-1.0.3.tar.gz:
Publisher:
pypi-publish.yml on thebigasif/ipgeolocationapi-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipgeolocateio-1.0.3.tar.gz -
Subject digest:
e83b7a276ccad3ff2091fad115add166ad765c7869ad3d8807a554028dc68464 - Sigstore transparency entry: 2754897436
- Sigstore integration time:
-
Permalink:
thebigasif/ipgeolocationapi-mcp@38ca515e682c5d1c4b75404779622a96f527d04e -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/thebigasif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@38ca515e682c5d1c4b75404779622a96f527d04e -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa72e3a976c97a6c27c94755a6af67615b0c9713d0bcfe2a8e027a8f991d1deb
|
|
| MD5 |
e88e935c231becdee1da2bbd750d3bd6
|
|
| BLAKE2b-256 |
4822e57f53d45ff6541236142e5796fec0e9bc3b3a8c4a3807f0657a7d14d636
|
Provenance
The following attestation bundles were made for ipgeolocateio-1.0.3-py3-none-any.whl:
Publisher:
pypi-publish.yml on thebigasif/ipgeolocationapi-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ipgeolocateio-1.0.3-py3-none-any.whl -
Subject digest:
fa72e3a976c97a6c27c94755a6af67615b0c9713d0bcfe2a8e027a8f991d1deb - Sigstore transparency entry: 2754898126
- Sigstore integration time:
-
Permalink:
thebigasif/ipgeolocationapi-mcp@38ca515e682c5d1c4b75404779622a96f527d04e -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/thebigasif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@38ca515e682c5d1c4b75404779622a96f527d04e -
Trigger Event:
push
-
Statement type: