Ipdata.co provides a RESTful API that allows you to lookup the location of any IP address, both IPv4 and IPv6.

Getting Started

The simplest call you can make would be a parameter-less GET call to the API endpoint at https://api.ipdata.co. This would return the location of the calling IP address.

https://api.ipdata.co?api-key=test

https://api.ipdata.co/8.8.8.8?api-key=test

curl https://api.ipdata.co?api-key=test
curl https://api.ipdata.co/8.8.8.8?api-key=test
Here are examples in more languages;
Pick a language
curl --header "Accept: application/json" https://api.ipdata.co?api-key=test

// Maven : Add these dependecies to your pom.xml (java6+)
// 
//     org.glassfish.jersey.core
//     jersey-client
//     2.8
// 
// 
//     org.glassfish.jersey.media
//     jersey-media-json-jackson
//     2.8
// 

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.MediaType;

Client client = ClientBuilder.newClient();
Response response = client.target("https://api.ipdata.co?api-key=test")
  .request(MediaType.TEXT_PLAIN_TYPE)
  .header("Accept", "application/json")
  .get();

System.out.println("status: " + response.getStatus());
System.out.println("headers: " + response.getHeaders());
System.out.println("body:" + response.readEntity(String.class));
                

var request = require('request');

request({
  method: 'GET',
  url: 'https://api.ipdata.co/?api-key=test',
  headers: {
    'Accept': 'application/json'
  }}, function (error, response, body) {
  console.log('Status:', response.statusCode);
  console.log('Headers:', JSON.stringify(response.headers));
  console.log('Response:', body);
});
                

var request = new XMLHttpRequest();

request.open('GET', 'https://api.ipdata.co/?api-key=test');

request.setRequestHeader('Accept', 'application/json');

request.onreadystatechange = function () {
  if (this.readyState === 4) {
    console.log('Status:', this.status);
    console.log('Headers:', this.getAllResponseHeaders());
    console.log('Body:', this.responseText);
  }
};

request.send();
                

from urllib2 import Request, urlopen

headers = {
  'Accept': 'application/json'
}
request = Request('https://api.ipdata.co/?api-key=test', headers=headers)

response_body = urlopen(request).read()
print response_body
                

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.ipdata.co?api-key=test");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  "Accept: application/json"
));

$response = curl_exec($ch);
curl_close($ch);

var_dump($response);
                

require 'rubygems' if RUBY_VERSION < '1.9'
require 'rest_client'

headers = {
  :accept => 'application/json'
}

response = RestClient.get 'https://api.ipdata.co/?api-key=test', headers
puts response
                

package main

import (
  "fmt"
  "io/ioutil"
  "net/http"
)

func main() {
  client := &http.Client{}

  req, _ := http.NewRequest("GET", "https://api.ipdata.co?api-key=test", nil)

  req.Header.Add("Accept", "application/json")

  resp, err := client.Do(req)

  if err != nil {
    fmt.Println("Errored when sending request to the server")
    return
  }

  defer resp.Body.Close()
  resp_body, _ := ioutil.ReadAll(resp.Body)

  fmt.Println(resp.Status)
  fmt.Println(string(resp_body))
}
                

//Common testing requirement. If you are consuming an API in a sandbox/test region, uncomment this line of code ONLY for non production uses.
//System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

//Be sure to run "Install-Package Microsoft.Net.Http" from your nuget command line.
using System;
using System.Net.Http;

var baseAddress = new Uri("https://api.ipdata.co?api-key=test");

using (var httpClient = new HttpClient{ BaseAddress = baseAddress })
{

  httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "application/json");
  
  using(var response = await httpClient.GetAsync("undefined"))
  {
 
        string responseData = await response.Content.ReadAsStringAsync();
  }
}
                
Examples for looking up a specific IP address. Replace 8.8.8.8 with any valid IPv4 or IPv6 address.
Pick a language
curl --header "Accept: application/json" https://api.ipdata.co/8.8.8.8?api-key=test

  // Maven : Add these dependecies to your pom.xml (java6+)
  // 
  //     org.glassfish.jersey.core
  //     jersey-client
  //     2.8
  // 
  // 
  //     org.glassfish.jersey.media
  //     jersey-media-json-jackson
  //     2.8
  // 
  
  import javax.ws.rs.client.Client;
  import javax.ws.rs.client.ClientBuilder;
  import javax.ws.rs.client.Entity;
  import javax.ws.rs.core.Response;
  import javax.ws.rs.core.MediaType;
  
  Client client = ClientBuilder.newClient();
  Response response = client.target("https://api.ipdata.co/8.8.8.8?api-key=test")
    .request(MediaType.TEXT_PLAIN_TYPE)
    .header("Accept", "application/json")
    .get();
  
  System.out.println("status: " + response.getStatus());
  System.out.println("headers: " + response.getHeaders());
  System.out.println("body:" + response.readEntity(String.class));
                  

  var request = require('request');
  
  request({
    method: 'GET',
    url: 'https://api.ipdata.co/8.8.8.8?api-key=test/',
    headers: {
      'Accept': 'application/json'
    }}, function (error, response, body) {
    console.log('Status:', response.statusCode);
    console.log('Headers:', JSON.stringify(response.headers));
    console.log('Response:', body);
  });
                  

  var request = new XMLHttpRequest();
  
  request.open('GET', 'https://api.ipdata.co/8.8.8.8?api-key=test/');
  
  request.setRequestHeader('Accept', 'application/json');
  
  request.onreadystatechange = function () {
    if (this.readyState === 4) {
      console.log('Status:', this.status);
      console.log('Headers:', this.getAllResponseHeaders());
      console.log('Body:', this.responseText);
    }
  };
  
  request.send();
                  

  from urllib2 import Request, urlopen
  
  headers = {
    'Accept': 'application/json'
  }
  request = Request('https://api.ipdata.co/8.8.8.8?api-key=test/', headers=headers)
  
  response_body = urlopen(request).read()
  print response_body
                  

  <?php
  $ch = curl_init();
  
  curl_setopt($ch, CURLOPT_URL, "https://api.ipdata.co/8.8.8.8?api-key=test");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  curl_setopt($ch, CURLOPT_HEADER, FALSE);
  
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Accept: application/json"
  ));
  
  $response = curl_exec($ch);
  curl_close($ch);
  
  var_dump($response);
                  

  require 'rubygems' if RUBY_VERSION < '1.9'
  require 'rest_client'
  
  headers = {
    :accept => 'application/json'
  }
  
  response = RestClient.get 'https://api.ipdata.co/8.8.8.8?api-key=test/', headers
  puts response
                  

  package main
  
  import (
    "fmt"
    "io/ioutil"
    "net/http"
  )
  
  func main() {
    client := &http.Client{}
  
    req, _ := http.NewRequest("GET", "https://api.ipdata.co/8.8.8.8?api-key=test", nil)
  
    req.Header.Add("Accept", "application/json")
  
    resp, err := client.Do(req)
  
    if err != nil {
      fmt.Println("Errored when sending request to the server")
      return
    }
  
    defer resp.Body.Close()
    resp_body, _ := ioutil.ReadAll(resp.Body)
  
    fmt.Println(resp.Status)
    fmt.Println(string(resp_body))
  }
                  

  //Common testing requirement. If you are consuming an API in a sandbox/test region, uncomment this line of code ONLY for non production uses.
  //System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
  
  //Be sure to run "Install-Package Microsoft.Net.Http" from your nuget command line.
  using System;
  using System.Net.Http;
  
  var baseAddress = new Uri("https://api.ipdata.co/8.8.8.8?api-key=test");
  
  using (var httpClient = new HttpClient{ BaseAddress = baseAddress })
  {
  
    httpClient.DefaultRequestHeaders.TryAddWithoutValidation("accept", "application/json");
    
    using(var response = await httpClient.GetAsync("undefined"))
    {
   
          string responseData = await response.Content.ReadAsStringAsync();
    }
  }
                  

Carrier Detection

We provide IP Address to Carrier Lookup with a database consisting of over 2500 carriers in 234 countries

We return the Brand Name, eg. Verizon, the Mobile Country Code (MCC) and the Mobile Network Code (MNC) belonging to the carrier.

The data is made available in a carrier object in the API response if we detect that an IP Address belongs to a particular carrier.

You can test this by entering the following IP Addresses in the lookup form on our homepage.

  • 69.78.70.144 - Verizon
  • 66.102.160.1 - AT&T
  • 100.128.0.9 - T-Mobile
  • 100.48.0.26 - Sprint

You can also request only the carrier data from the API with;


              curl https://api.ipdata.co/100.128.0.9/carrier?api-key=test

Threat Intelligence Data

Our threat data consists of a database of 600M malicious IP addresses from several authoritative and actively maintained lists.
We also track Tor nodes and aggregate data from several sources that track open proxies.

Description

  • is_tor: is True if the IP address is associated with a node on the Tor network
  • is_proxy: is True if the IP address is a known proxy, includes HTTP/HTTPS/SSL/SOCKS/CONNECT and transparent proxies
  • is_anonymous: is set to True if either one of is_tor or is_proxy is true
  • is_known_attacker: is True if an IP address is a known source of malicious activity, i.e. attacks, malware, botnet activity etc
  • is_known_abuser: is True if the IP address is a known source of abuse i.e. spam, harvesters, registration bots and other nuisance bots etc
  • is_threat: is True if either one of is_known_abuser or is_known_attacker is true

JSONP

This is as simple as passing the callback parameter with your request.


$.get("https://api.ipdata.co?api-key=test", function (response) {
$("#response").html(JSON.stringify(response, null, 4));
}, "jsonp");

Bulk Lookups

It's just as easy to lookup multiple IP addresses.

Note that bulk lookups are only available to paid users and are currently limited to a 100 at a time. Reach out to support if you need to lookup larger batches.

Make a POST request to https://api.ipdata.co/bulk?api-key=your-paid-api-key with the IP Addresses as a JSON Array in the body of the request;


                ["1.1.1.1", "2.2.2.2", "3.3.3.3", "4.4.4.4", "5.5.5.5", "6.6.6.6", "7.7.7.7", "8.8.8.8", "9.9.9.9", "10.10.10.10"]
              
That would return a JSON Array of API Response JSON Objects

[
  {
      "ip": "1.1.1.1",
      "is_eu": false,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "Australia",
      "country_code": "AU",
      "continent_name": "Oceania",
      "continent_code": "OC",
      "latitude": -33.494,
      "longitude": 143.2104,
      "asn": "AS13335",
      "organisation": "Cloudflare Inc",
      "postal": "",
      "calling_code": "61",
      "flag": "https://ipdata.co/flags/au.png",
      "emoji_flag": "🇦🇺",
      "emoji_unicode": "U+1F1E6 U+1F1FA",
      "languages": [
          {
              "name": "English",
              "native": "English"
          }
      ],
      "currency": {
          "name": "Australian Dollar",
          "code": "AUD",
          "symbol": "AU$",
          "native": "$",
          "plural": "Australian dollars"
      },
      "time_zone": {
          "name": "",
          "abbr": "",
          "offset": "",
          "is_dst": "",
          "current_time": ""
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": true,
          "is_threat": true,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "2.2.2.2",
      "is_eu": true,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "France",
      "country_code": "FR",
      "continent_name": "Europe",
      "continent_code": "EU",
      "latitude": 48.8582,
      "longitude": 2.3387000000000002,
      "asn": "AS3215",
      "organisation": "Orange",
      "postal": "",
      "calling_code": "33",
      "flag": "https://ipdata.co/flags/fr.png",
      "emoji_flag": "🇫🇷",
      "emoji_unicode": "U+1F1EB U+1F1F7",
      "carrier": {
          "name": "Orange",
          "mcc": "208",
          "mnc": "01"
      },
      "languages": [
          {
              "name": "French",
              "native": "Français"
          }
      ],
      "currency": {
          "name": "Euro",
          "code": "EUR",
          "symbol": "€",
          "native": "€",
          "plural": "euros"
      },
      "time_zone": {
          "name": "Europe/Paris",
          "abbr": "CEST",
          "offset": "+0200",
          "is_dst": true,
          "current_time": "2018-10-01T10:37:55.031677+02:00"
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "3.3.3.3",
      "is_eu": false,
      "city": "Seattle",
      "region": "Washington",
      "region_code": "WA",
      "country_name": "United States",
      "country_code": "US",
      "continent_name": "North America",
      "continent_code": "NA",
      "latitude": 47.6344,
      "longitude": -122.3422,
      "asn": "",
      "organisation": "",
      "postal": "98109",
      "calling_code": "1",
      "flag": "https://ipdata.co/flags/us.png",
      "emoji_flag": "🇺🇸",
      "emoji_unicode": "U+1F1FA U+1F1F8",
      "languages": [
          {
              "name": "English",
              "native": "English"
          }
      ],
      "currency": {
          "name": "US Dollar",
          "code": "USD",
          "symbol": "$",
          "native": "$",
          "plural": "US dollars"
      },
      "time_zone": {
          "name": "America/Los_Angeles",
          "abbr": "PDT",
          "offset": "-0700",
          "is_dst": true,
          "current_time": "2018-10-01T01:37:55.032920-07:00"
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "4.4.4.4",
      "is_eu": false,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "United States",
      "country_code": "US",
      "continent_name": "North America",
      "continent_code": "NA",
      "latitude": 37.751,
      "longitude": -97.822,
      "asn": "AS3356",
      "organisation": "Level 3 Parent, LLC",
      "postal": "",
      "calling_code": "1",
      "flag": "https://ipdata.co/flags/us.png",
      "emoji_flag": "🇺🇸",
      "emoji_unicode": "U+1F1FA U+1F1F8",
      "languages": [
          {
              "name": "English",
              "native": "English"
          }
      ],
      "currency": {
          "name": "US Dollar",
          "code": "USD",
          "symbol": "$",
          "native": "$",
          "plural": "US dollars"
      },
      "time_zone": {
          "name": "",
          "abbr": "",
          "offset": "",
          "is_dst": "",
          "current_time": ""
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "5.5.5.5",
      "is_eu": true,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "Germany",
      "country_code": "DE",
      "continent_name": "Europe",
      "continent_code": "EU",
      "latitude": 51.2993,
      "longitude": 9.491,
      "asn": "AS12638",
      "organisation": "Telefonica Germany",
      "postal": "",
      "calling_code": "49",
      "flag": "https://ipdata.co/flags/de.png",
      "emoji_flag": "🇩🇪",
      "emoji_unicode": "U+1F1E9 U+1F1EA",
      "languages": [
          {
              "name": "German",
              "native": "Deutsch"
          }
      ],
      "currency": {
          "name": "Euro",
          "code": "EUR",
          "symbol": "€",
          "native": "€",
          "plural": "euros"
      },
      "time_zone": {
          "name": "",
          "abbr": "",
          "offset": "",
          "is_dst": "",
          "current_time": ""
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "6.6.6.6",
      "is_eu": false,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "United States",
      "country_code": "US",
      "continent_name": "North America",
      "continent_code": "NA",
      "latitude": 37.751,
      "longitude": -97.822,
      "asn": "",
      "organisation": "",
      "postal": "",
      "calling_code": "1",
      "flag": "https://ipdata.co/flags/us.png",
      "emoji_flag": "🇺🇸",
      "emoji_unicode": "U+1F1FA U+1F1F8",
      "languages": [
          {
              "name": "English",
              "native": "English"
          }
      ],
      "currency": {
          "name": "US Dollar",
          "code": "USD",
          "symbol": "$",
          "native": "$",
          "plural": "US dollars"
      },
      "time_zone": {
          "name": "",
          "abbr": "",
          "offset": "",
          "is_dst": "",
          "current_time": ""
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "7.7.7.7",
      "is_eu": false,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "United States",
      "country_code": "US",
      "continent_name": "North America",
      "continent_code": "NA",
      "latitude": 37.751,
      "longitude": -97.822,
      "asn": "AS27651",
      "organisation": "ENTEL CHILE S.A.",
      "postal": "",
      "calling_code": "1",
      "flag": "https://ipdata.co/flags/us.png",
      "emoji_flag": "🇺🇸",
      "emoji_unicode": "U+1F1FA U+1F1F8",
      "languages": [
          {
              "name": "English",
              "native": "English"
          }
      ],
      "currency": {
          "name": "US Dollar",
          "code": "USD",
          "symbol": "$",
          "native": "$",
          "plural": "US dollars"
      },
      "time_zone": {
          "name": "",
          "abbr": "",
          "offset": "",
          "is_dst": "",
          "current_time": ""
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "8.8.8.8",
      "is_eu": false,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "United States",
      "country_code": "US",
      "continent_name": "North America",
      "continent_code": "NA",
      "latitude": 37.751,
      "longitude": -97.822,
      "asn": "AS15169",
      "organisation": "Google LLC",
      "postal": "",
      "calling_code": "1",
      "flag": "https://ipdata.co/flags/us.png",
      "emoji_flag": "🇺🇸",
      "emoji_unicode": "U+1F1FA U+1F1F8",
      "languages": [
          {
              "name": "English",
              "native": "English"
          }
      ],
      "currency": {
          "name": "US Dollar",
          "code": "USD",
          "symbol": "$",
          "native": "$",
          "plural": "US dollars"
      },
      "time_zone": {
          "name": "",
          "abbr": "",
          "offset": "",
          "is_dst": "",
          "current_time": ""
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": true,
          "is_threat": true,
          "is_bogon": false
      },
      "count": "695"
  },
  {
      "ip": "9.9.9.9",
      "is_eu": true,
      "city": "",
      "region": "",
      "region_code": "",
      "country_name": "France",
      "country_code": "FR",
      "continent_name": "Europe",
      "continent_code": "EU",
      "latitude": 48.8582,
      "longitude": 2.3387000000000002,
      "asn": "AS19281",
      "organisation": "Quad9",
      "postal": "",
      "calling_code": "33",
      "flag": "https://ipdata.co/flags/fr.png",
      "emoji_flag": "🇫🇷",
      "emoji_unicode": "U+1F1EB U+1F1F7",
      "languages": [
          {
              "name": "French",
              "native": "Français"
          }
      ],
      "currency": {
          "name": "Euro",
          "code": "EUR",
          "symbol": "€",
          "native": "€",
          "plural": "euros"
      },
      "time_zone": {
          "name": "Europe/Paris",
          "abbr": "CEST",
          "offset": "+0200",
          "is_dst": true,
          "current_time": "2018-10-01T10:37:55.043064+02:00"
      },
      "threat": {
          "is_tor": false,
          "is_proxy": false,
          "is_anonymous": false,
          "is_known_attacker": false,
          "is_known_abuser": false,
          "is_threat": false,
          "is_bogon": false
      },
      "count": "695"
  }
]

Libraries

Let us know if you develop a language specific library and would like it listed here. Currently only the Python, Node and Golang libraries are officially supported.

Python SDK

By Jonathan Kosgei

Installation


pip install ipdata
Using the library

from ipdata import ipdata
ip = ipdata.ipdata()
data = ip.lookup('1.1.1.1')
if data['status']==200:
    for key in data['response']:
        print('#', key, ':', data['response'][key])
else:
    print(data['response'])
# ip : 1.1.1.1
# city : Research
# region : Victoria
# country_name : Australia
# country_code : AU
# continent_name : Oceania
# continent_code : OC
# latitude : -37.7
# longitude : 145.1833
# asn : 
# organisation : 
# postal : 3095
# currency : AUD
# currency_symbol : $
# calling_code : 61
# flag : https://ipdata.co/flags/au.png
# time_zone : Australia/Melbourne

country = ip.lookup('1.1.1.1')['response']['country_name']
# 'Australia'
Using an API key

from ipdata import ipdata

apikey = 'myapikey'
ip = ipdata.ipdata(apikey=apikey)
data = ip.lookup('1.1.1.1')

if data['status']==200:
    for key in data['response']:
        print('#', key, ':', data['response'][key])
else:
    print(data['response'])
        
        

Javascript SDK

This is a user contributed library. Special thanks to @thomasconner for creating this! Test this in your browser.

Installation


npm install ipdata

Importing

Import the library under a namespace.


  import * as ipdata from 'ipdata';
  // ipdata.lookup()

Import just the lookup function.


  import { lookup } from 'ipdata';
  // lookup()

Require the library.


  var ipdata = require('ipdata');
  // ipdata.lookup()

Usage

Looking up the calling IP


lookup()
.then(function(info) {
  // info.ip === 'hostcomputerip'
  // ...
})

Looking up any IP address


  lookup('8.8.8.8')
  .then(function(info) {
    // info.ip === 8.8.8.8
    // ...
  })

Using an API key


lookup('8.8.8.8', 'apiKey')
.then(function(info) {
  // info.ip === 8.8.8.8
  // ...
})

Go SDK

This is a user contributed library. Special thanks to @theckman for creating this!

Usage


import "github.com/theckman/go-ipdata"

ipd := ipdata.NewClient("")

data, err := ipd.Lookup("8.8.8.8")
if err != nil {
  // handle error
}

fmt.Printf("%s (%s)\n", data.IP, data.ASN)

Error handling


import "github.com/pkg/errors"

data, err := ipd.Lookup("8.8.8.8")
if err != nil {
  // do a type assertion on the error
  rerr, ok := errors.Cause(err).(interface{
      RateLimited() bool
    })

    if !ok {
      // this wasn't a failure from rate limiting
    }

    if rerr.RateLimited() {
      // we were rate limited
    }
}

Selecting Response Fields

You can choose to request only a single field be returned in the API response.

The available fields are;

  • ip
  • is_eu
  • city
  • region
  • region_code
  • country_name
  • country_code
  • continent_name
  • continent_code
  • latitude
  • longitude
  • asn
  • organisation
  • postal
  • calling_code
  • flag
  • emoji_flag
  • emoji_unicode
  • carrier
  • languages
  • currency
  • time_zone
  • threat
  • count

For a description of every field see Our Data Table

Security

There are a number of ways you can secure your API Key.

Domain and IP Whitelisting

You have the option to restrict usage of your API Key to a list of domains or IP Addresses. To enable this for your API Key, send an email with your request to support@ipdata.co

End User Rate Limiting

You can also limit the number of times any one IP Address can make calls using your API Key. To enable this for your API Key, send an email with your request to support@ipdata.co

Response Fields

A description of every field returned by the API.

Response Field Description
ip The IP address that was looked up.
is_eu Returns true or false depending on whether the country is a recognized member of the European Union. The list of all EU countries is compiled from this list on the European Union website.
count The total number of requests made by your API key in the last 24 hrs. Updates once a minute.
city The name of the city from where the IP Address is located.
region The name of the region where the IP Address is located.
region_code The 3 letter ISO 3166-2 code for the region.
country_name The name of the country where the IP Address is located.
country_code The 2 letter ISO 3166-1 alpha-2 code for the country.
continent_name The name of the continent where the IP Address is located. One of; Africa, Antarctica, Asia, Europe, North America, Oceania, South America
continent_code The 2 letter ISO 3166-1 alpha-2 code for the continent. One of; AF, AN, AS, EU, NA, OC, SA
latitude An approximate latitudinal location for the IP Address. Often near the center of population.
longitude An approximate longitudinal location for the IP Address. Often near the center of population.
asn The Autonomous System Number that references the IP Address's owning organization.
organisation The name of the Organisation that owns the IP Address. This will default to the ISP is the name of the organisation is not available.
postal The Postal code for where the IP Address is located.
calling_code The Internation Calling Code for the country where the IP Address is located.
flag A link to a PNG file with the flag of the country where the IP Address is located.
emoji_flag An emoji version of the flag of the country where the IP Address is located.
emoji_unicode The Unicode for the emoji flag.
carrier A JSON object with details of the IP Addresses's carrier.
carrier -> name The name of the carrier that owns the IP Address.
carrier -> mcc The Mobile Country Code of the carrier.
carrier -> mnc The Mobile Network Code that identifies the carrier.
languages A JSON list of individual language objects.
languages -> name The English name of the language.
languages -> native The Native name of the language.
currency A JSON object with details of the IP Address country's main currency.
currency -> name The name of the currency.
currency -> code The ISO 4217 currency code.
currency -> symbol The symbol of the currency.
currency -> native The native symbol of the currency.
currency -> plural The plural version of the currency. For example; US dollars, Australian dollars, euros
time_zone A JSON object with details of the Timezone the IP Address belongs to.
time_zone -> name The name of the Timezone Eg. "America/Los_Angeles"
time_zone -> abbr The Abbreviation of the Timezone Eg. "PDT"
time_zone -> offset The UTC offset of the Timezone Eg. "-0700"
time_zone -> is_dst true or false depending on whether or not Daylight Savings have been accounted for.
time_zone -> current_time The exact current time in the Timezone the IP Address belongs to accounting for Daylight Savings.
threat A JSON object representing the threat intelligence profile of the IP Address.
threat -> is_tor true or false depending on whether the IP Address is a known Tor exit node or relay.
threat -> is_proxy true or false depending on whether the IP Address is a known proxy or any type.
threat -> is_anonymous true or false depending on whether is_tor or is_proxy is true.
threat -> is_known_attacker true or false if the IP Address is a known (reported) source of malicious activity.
threat -> is_known_abuser true or false if the IP Address is a known (reported) source of abuse.
threat -> is_threat true or false depending on whether is_known_abuser or is_known_attacker is true.
threat -> is_bogon true or false if the IP Address is a Bogon i.e. an unassigned, unaddressable IP address

Status Codes

The following are a list of status codes and their meanings as returned by the API.

Status Code Meaning
200 (OK) Your request was valid and a response was successfully returned.
400 (Bad Request) In the case of a private IP address the error will be accompanied by the message {"message": "127.0.0.1 is a private IP address"}. In the case of input that is not a valid IPv4 or IPv6 address you will get the message {"message": "bleh does not appear to be an IPv4 or IPv6 address"}
401 (Unauthorized) This status code will be returned if you do not provide an API key in a request. It is accompanied by the message You have not provided a valid API Key.
403 (Forbidden) This status code will be returned if you have made more than the 1500 requests on the free plan or exceeded your daily plan quota. It is accompanied by the message You have exceeded your free tier limit of 1500 requests. Register for a paid plan at https://ipdata.co to make more requests.