donate.png

API information

There are 4 different database formats which are html, csv, json and xml. All results contain the ip you've looked up, two letter abbriviation (ISO 3166), three letter abbriviation, country name, registar and when it was assigned in unix timestamp.

When ever the country abbriviations return ZZ it means that there's no real location found. There might still be additional results. However this might not correspond in reality.

HTML data format

This returns the data in html format however it's kinda the same data format as CSV the only real difference here Content-Type is text/html, multiple results possible.

Sample for http://api.ip2c.info/html/127.0.0.1
"127.0.0.1","ZZ","ZZZ","Reserved","iana","410227200"

CSV data format

This returns the data in CSV data format with Content-Type text/plain. Sperated by , with double quotes arround it, multiple results possible.

Sample for http://api.ip2c.info/csv/127.0.0.1
"127.0.0.1","ZZ","ZZZ","Reserved","iana","410227200"

XML data format

This returns the data in XML data format with Content-Type text/xml, multiple results possible. The format is a ip2c tag with ip attribute within the ip2c tag there might be several result tags with attributes more info look at the sample below.

Sample for http://api.ip2c.info/xml/127.0.0.1
<ip2c ip="127.0.0.1">
  <result code2="ZZ" code3="ZZZ" country="Reserved" registry="iana" assigned="410227200"/>
</ip2c>

JSON data format

This returns the data in JSON data format format with Content-Type application/json, multiple results possible. I beleve the if you look at the sample data that you can make up what it all means.

Sample for http://api.ip2c.info/json/127.0.0.1
{
  "ip2c": {
    "Result": {
      "Code2":         "ZZ",
      "Code3":         "ZZZ",
      "Country":       "Reserved",
      "Registry":      "iana",
      "Assigned":      "410227200"
    },
    "IP":              "127.0.0.1"
  }
}