Free IP geolocation API client with built-in security detection — VPN, proxy, Tor, hosting flags on every plan
Project description
IPGeo Python SDK
Free IP geolocation API client with built-in security detection — VPN, proxy, Tor, and hosting flags included on every plan. Zero infrastructure, one API key.
Install
pip install ipgeo-api
Quick Start
from ipgeo import IPGeoClient
client = IPGeoClient("ipgeo_YOUR_API_KEY")
# Look up an IP
data = client.lookup("8.8.8.8")
print(data["location"]["country"]["name"]) # United States
print(data["security"]["is_hosting"]) # True
# Look up your own IP
me = client.me()
print(me["ip"])
# Batch lookup (up to 100 IPs)
result = client.batch(["8.8.8.8", "1.1.1.1", "8.8.4.4"])
for r in result["results"]:
print(r["ip"], r["location"]["country"]["code"])
# Field filtering — only get what you need
data = client.lookup("8.8.8.8", fields="country,security")
# Returns only location (country needed) + security blocks
# Check usage
usage = client.usage()
print(f"{usage['remaining_quota']}/{usage['monthly_quota']} remaining")
Response Structure
{
"ip": "8.8.8.8",
"location": {
"country": {"code": "US", "name": "United States"},
"city": "Mountain View",
"latitude": 37.4223,
"longitude": -122.0842,
"timezone": "America/Los_Angeles"
},
"network": {
"isp": "Google LLC",
"asn": 15169,
"type": "hosting"
},
"security": {
"is_tor": false,
"is_vpn": false,
"is_proxy": false,
"is_hosting": true
},
"meta": {
"data_source": "GeoLite2"
}
}
API Reference
IPGeoClient(api_key, base_url?, timeout?)
| Param | Default | Description |
|---|---|---|
api_key |
(required) | Your IPGeo API key |
base_url |
https://api.getipgeo.com |
API server URL |
timeout |
10 |
Request timeout in seconds |
Methods
| Method | Description |
|---|---|
lookup(ip, fields?) |
Look up a single IP address |
me() |
Look up the caller's own IP |
batch(ips) |
Look up up to 100 IPs at once |
usage() |
Check monthly quota usage |
health() |
API health check (no auth) |
Plans
| Plan | Monthly Quota | Rate Limit |
|---|---|---|
| Free | 10,000 | 60/min |
| Starter | 100,000 | 600/min |
| Pro | 500,000 | 3,000/min |
| Business | 1,000,000 | 10,000/min |
License
MIT · IPGeo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ipgeo_api-0.1.0.tar.gz
(3.9 kB
view details)
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 ipgeo_api-0.1.0.tar.gz.
File metadata
- Download URL: ipgeo_api-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a01ed7205a75727c200879ae6fe592b354a16bb0dcf2a4da3cc2210a10fa013
|
|
| MD5 |
7f79006461016117c019a317d2fcac78
|
|
| BLAKE2b-256 |
6c60c3ef42791c6b0efdb58eff1756d200b39f09909f71334a831faf412fff29
|
File details
Details for the file ipgeo_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ipgeo_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2b2cfa5b4b2c68de678dfef93b7b30a5e2cafad8be3a829ca25f50ed72a860
|
|
| MD5 |
528182003c44fab4e2f1f0f5c8817173
|
|
| BLAKE2b-256 |
79bd57133fe65a31bbcad25852eae1faeb6661f1d22c86fad286376a84cf5707
|