How do the JSON output and object table of URL lookup API of API Ninjas work?

In this article, I will clarify the object table and JSON output specifically of API Ninjas' URL lookup API. I will explain how the object table and JSON output are structured, and provide examples of how the data is presented in each format. Understanding the object table and JSON output of the URL lookup API is important for effectively accessing and utilizing the data returned by the API.

Object and description table

ObjectsDescription
is_valid
countryCountry
country_code2-digit country code
region_code2-digit region code
regionRegion name
cityCity
zipZip code
latLatitude
lonLongitude
timezoneTime zone
ispInternet service provider
urlURL address
  • is_valid: Indicates whether the provided URL is a valid address or not.

  • country: The name of the country where the server hosting the URL is located.

  • country_code: The 2-digit code for the country where the server hosting the URL is located.

  • region_code: The 2-digit code for the region/state/province where the server hosting the URL is located.

  • region: The name of the region/state/province where the server hosting the URL is located.

  • city: The name of the city where the server hosting the URL is located.

  • zip: The zip/postal code for the location where the server hosting the URL is located.

  • lat: The latitude of the location where the server hosting the URL is located.

  • lon: The longitude of the location where the server hosting the URL is located.

  • timezone: The time zone of the location where the server hosting the URL is located.

  • isp: The internet service provider that is hosting the URL.

  • url: The original URL that was looked up.

JSON explained

The information in the table is useful because it provides a wealth of information about a specific URL. For example, knowing the country, region, and city where a server hosting a URL is located can be useful for understanding the geographic distribution of website traffic. Additionally, the internet service provider (ISP) hosting the URL can be useful for identifying which companies are hosting the most websites. The latitude and longitude coordinates of the server location can be used to plot the location on a map. The time zone of the server location can be useful for understanding the time of day when website traffic is the highest. Overall, this information can be useful for a variety of purposes, such as website analytics, marketing, and security.

This JSON output contains information about a specific URL. The is_valid field is a boolean value that indicates whether the provided URL is a valid address or not. The country field contains the name of the country where the server hosting the URL is located, in this case "United States". The country_code field contains the 2-digit code for the country, in this case "US". The region_code field contains the 2-digit code for the region/state/province where the server hosting the URL is located, in this case "MA" for Massachusetts. The region field contains the name of the region/state/province where the server hosting the URL is located, in this case "Massachusetts". The city field contains the name of the city where the server hosting the URL is located, in this case "Norwell". The zip field contains the zip/postal code for the location where the server hosting the URL is located, in this case "02061". The lat field contains the latitude of the location where the server hosting the URL is located, in this case 42.1591. The lon field contains the longitude of the location where the server hosting the URL is located, in this case -70.8163. The timezone field contains the time zone of the location where the server hosting the URL is located, in this case "America/New_York". The isp field contains the internet service provider that is hosting the URL, in this case "MCI Communications Services, Inc. d/b/a Verizon Business". The url field contains the original URL that was looked up, in this case "example.com".

{
"is_valid": true,
"country": "United States",
"country_code": "US",
"region_code": "MA",
"region": "Massachusetts",
"city": "Norwell",
"zip": "02061",
"lat": 42.1591,
"lon": -70.8163,
"timezone": "America/New_York",
"isp": "MCI Communications Services, Inc. d/b/a Verizon Business",
"url": "example.com"
}

Closing words

We have now discussed the object table and JSON output of API Ninjas' URL lookup API. We explained the structure and contents of the object table and JSON output, and provided examples of how the data is presented in each format. We also discussed the usefulness of the information contained in the object table and JSON output, including information about the location, time zone, and internet service provider of a specific URL. Understanding the object table and JSON output of the URL lookup API is important for effectively accessing and utilizing the data returned by the API.

Reference

The API Ninjas URL lookup API is a tool that allows you to retrieve information about a specific URL, such as the location, time zone, and internet service provider of the server hosting the URL. To access the API, you can request access through the third party data marketplace of Worldindata. Worldindata is a platform that provides a wide range of data and APIs from various sources, and makes it easy for users to find and access the data they need. By requesting access to the API Ninjas URL lookup API through Worldindata, you can easily access and utilize the data provided by the API in your own projects.