geocode.netgeocode.net

Locate an IP address

GET/v1/ip

GET/v1/ip

Locate an IP address

IP geolocation: continent, country, region, city, approximate coordinates, time zone and the country's primary
languages. City-level accuracy, suitable for localisation, defaults and analytics, not for pinpointing a person.
Data: IP Geolocation by DB-IP (db-ip.com), City Lite edition, CC BY 4.0, refreshed monthly. Leave ip empty only
when calling the API directly; through the gateway the API sees the gateway's address, so pass the visitor's ip.

PARAMETERS
ipquery · string
IPv4 or IPv6 address. Leave empty for the address the API sees the call from.
In the full reference
REQUEST
curl "https://api.geocode.net/v1/ip" \
  -H "X-API-Key: YOUR_KEY"
RESPONSE
200Successful Response
{
  "ip": "8.8.8.8",
  "continent": {
    "code": "NA",
    "name": "North America"
  },
  "country": {
    "code": "US",
    "name": "United States",
    "is_eu": false
  },
  "region": {
    "name": "California"
  },
  "city": "Mountain View",
  "location": {
    "lat": 37.422,
    "lng": -122.085
  },
  "timezone": {
    "name": "America/Los_Angeles",
    "utc_offset": "-07:00"
  },
  "languages": [
    "en",
    "es"
  ],
  "source": "IP Geolocation by DB-IP (https://db-ip.com), CC BY 4.0"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.