Geolocate IP Address
PythonDataPOST api.upapi.io/ip-geolocation.getResolve an IP (IPv4 or IPv6) to city, region, country, lat/long, timezone, ASN, and currency. Omit the ip field to geolocate the caller.
ipgeolocationasnpython
AuthAPI key
Cost1 unit
Timeout12s
Cache3600s
Request schema
| Field | Type | Description |
|---|---|---|
ip | IPv4 or IPv6 address; omit to geolocate the caller· default: null |
Response schema
| Field | Type | Description |
|---|---|---|
ipreq | string | |
asnreq | ||
orgreq | ||
cityreq | ||
postalreq | ||
regionreq | ||
countryreq | ||
currencyreq | ||
latitudereq | ||
timezonereq | ||
fetchedAtreq | string | |
languagesreq | array | |
longitudereq | ||
countryCodereq |
Try it
Try it
IPv4 or IPv6 address; omit to geolocate the caller
Run this endpoint live
Jump in as a guest — no signup — and run ip-geolocation.get with your own inputs. Create a free account anytime to get your own API key.
Code examples
curl -X POST https://api.upapi.io/ip-geolocation.get \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{ "ip": "8.8.8.8" }'Developer tools
OpenAPI specImport the spec or collection into Postman, Insomnia, or any codegen tool.