IP Geolocation
Look up geographic location and ASN data for IPv4 and IPv6 addresses.
Endpoints
GET /api/v1/ip/{ip}
GET /api/v1/ip # Uses client's IP address
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ip | string | No | IPv4 or IPv6 address |
Response
{
"ip": "8.8.8.8",
"ipType": "IPV4",
"countryCode": "US",
"countryName": "United States",
"regionName": "California",
"regionCode": "CA",
"cityName": "Mountain View",
"continentCode": "NA",
"continentName": "North America",
"lat": 37.386,
"lng": -122.0838,
"zipCode": "94035",
"timezone": "America/Los_Angeles",
"isEU": false,
"asn": 15169,
"asnOrganization": "GOOGLE"
}
Response Fields
| Field | Type | Description |
|---|---|---|
ip | string | The queried IP address |
ipType | string | IP version (IPV4 or IPV6) |
countryCode | string | ISO 3166-1 alpha-2 country code |
countryName | string | Full country name |
regionName | string | Region/state name |
regionCode | string | Region/state code |
cityName | string | City name |
continentCode | string | Continent code (NA, EU, AS, AF, OC, SA, AN) |
continentName | string | Full continent name |
lat | number | Latitude |
lng | number | Longitude |
zipCode | string | Postal/ZIP code |
timezone | string | IANA timezone identifier |
isEU | boolean | Whether the country is in the European Union |
asn | integer | Autonomous System Number |
asnOrganization | string | Name of the organization owning the ASN |
Notes
- Local/private IP addresses (loopback, link-local, site-local) will return
404 Not Found - Powered by MaxMind GeoLite2 database
- Accuracy varies by location — typically city-level for most regions