API Documentation

API Documentation

Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:

 Name  Description
  ip  This parameter queries a ip in order to retrieve informations about that ip, and will return the following:
  • CONTINENT_CODE, continent code
  • CONTINENT_NAME, full continent name
  • COUNTRY_CODE_2, country code
  • COUNTRY_NAME, country name
  • COUNTRY_LAT, country latitude
  • COUNTRY_LONG, country longitude
  • REGION_NAME, region name
  • CITY_NAME, city name
  • CITY_LAT, city latitude
  • CITY_LONG, city longitude


URL parameter

Here is an example of a GET request on our API:

http://www.ip.uta-marian.com/api?ip=54.166.146.212

This is the output that our API will return when you query for an url:

{
	"apiVersion":"1.0",
	"ADDRESS":"206.74.255.120",
	"HOSTNAME":"rocket.wcsd.k12.sc.us",
	"ISP":"*.wcsd.k12.sc.us",
	"DECIMAL":3461021560,
	"CONTINENT_CODE":"NA",
	"CONTINENT_NAME":"North America",
	"COUNTRY_CODE_2":"US",
	"COUNTRY_NAME":"United States",
	"COUNTRY_LAT":38,
	"COUNTRY_LONG":-98,
	"REGION_NAME":"South Carolina",
	"CITY_NAME":"Columbia",
	"CITY_LAT":33.9849,
	"CITY_LONG":-81.025
}

	
An example of json decoding would be the following PHP code:

<?php
header('Content-Type: text/plain; charset=utf-8;');
$file = file_get_contents("http://www.ip.uta-marian.com/api?ip=54.166.146.212");
print_r(json_decode($file, true ));
?>