Fast IP Geolocation data API.

Free for non commercial use.

API Documentation Donate for 🌴⛱️

Getting Started

This is very easy to use service. You request IP address as an argument in the url and get JSON formated results. Below is few examples in different languages. Current API endpoints are: ipdig.io/me, ipdig.io/{ip_address} and ipdig.io/{ip_address}/{field}.

You can format any query to be returned in more readable way. Just add ?pretty=1 to it.

# curl 'https://ipdig.io/'
  "city": "Research",
  "continent": "OC",
  "continent_full": "Oceania",
  "country": "AU",
  "country_full": "Australia",
  "ip": "",
  "is_eu": "false",
  "loc": "-37.7000,145.1833",
  "organization": "Cloudflare Inc",
  "postal": "3095",
  "region": "Victoria"
# curl https://ipdig.io/me
{"city":"Vilnius","continent":"EU","continent_full":"Europe","country":"LT","country_full":"Republic of Lithuania","ip":"xxx.xxx.xxx.xxx","is_eu":"true","loc":"54.6973,25.2662","organization":"Telia Lietuva, AB","postal":"08106","region":"Vilnius"}
# curl https://ipdig.io/me/ip
# curl https://ipdig.io/
Cloudflare Inc

Example uses Python requests module (pip install requests).

import requests, json

ip_address = '';
url = 'https://ipdig.io/' + ip_address;
data = requests.get(url)
result = data.json()

require 'open-uri'
require 'json'

ip_address = ''
url = "https://ipdig.io/#{ip_address}"
data = open(url).read
result = JSON.parse(data)

puts result['city']
  $ip_address = '';
  $url = "https://ipdig.io/" . $ip_address;
  $data = file_get_contents($url);
  $result = json_decode($data);

  echo $result->city;

Example how to use it from JavaScript with a callback function like in this page above.

<script type="application/javascript">
  function myIP(json) {
    'Your IP: ' + json.ip + '<br />'
    +'Country: ' + json.country + '<br />'
    +'Continent: ' + json.continent_full + '<br />'
    +'Internet Provider: ' + json.organization + '<br />'
<script src="https://ipdig.io/me?callback=myIP"></script>