mobile

API Docs

A simple API to get geolocation data for IP addresses. No API key is required for basic usage.

Usage Examples

Get details for your IP address:

curl -L iplocation.info

Get details for any IP address:

curl -L iplocation.info/8.8.8.8

If you're not getting JSON responses, you may need to specify the Accept header:

curl -LH "Accept: application/json" iplocation.info/8.8.8.8

Example Response

The API returns a JSON object with location and network information:

{
  "ip_address": "8.8.8.8",
  "hostname": "dns.google",
  "asn": "GOOGLE",
  "lat": 39.03,
  "lon": -77.5,
  "city": "Ashburn",
  "postal_code": "20149",
  "region": "Virginia",
  "region_code": "VA",
  "country": "United States",
  "country_code": "US",
  "timezone": "America/New_York"
}