{"id":7518,"date":"2020-05-04T18:34:58","date_gmt":"2020-05-04T13:34:58","guid":{"rendered":"https:\/\/thedevcouple.com\/?p=7518"},"modified":"2020-06-09T14:11:43","modified_gmt":"2020-06-09T09:11:43","slug":"ip-geolocation-api-review-2","status":"publish","type":"post","link":"https:\/\/thedevcouple.com\/ip-geolocation-api-review-2\/","title":{"rendered":"IP Geolocation API Review \u2013\u00a0Lightning Fast Geo API You Need!"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">It is quite important for content creators, course makers to know from where their audience is coming from. There are different kinds of products available on the Internet just for this purpose. Most of these products are paid and cost too much. They also need maintainability.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">During this time, there is still a product out there which provides you all this information and more for a price of $0. It not only allows you to get your customer\u2019s location but also provides a whole lot of other information about that location like currency, country code, continent, etc. The product I am talking about is the IP Geolocation API.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this piece, I am going to share with you my two cents about working with this API. How it works and what kind of information it provides. So without any further delay, let\u2019s jump in! \ud83d\ude4c\ud83c\udffb<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7519\" src=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple.png\" alt=\"Cover Thedevcouple\" width=\"5760\" height=\"3840\" srcset=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple.png 5760w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-300x200.png 300w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-1024x683.png 1024w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-768x512.png 768w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-1536x1024.png 1536w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-2048x1365.png 2048w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-1920x1280.png 1920w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-1680x1120.png 1680w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-1240x827.png 1240w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-860x573.png 860w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-680x453.png 680w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-500x333.png 500w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-400x267.png 400w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-250x167.png 250w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-200x133.png 200w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-100x67.png 100w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-76x51.png 76w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-thedevcouple-50x33.png 50w\" sizes=\"(max-width: 5760px) 100vw, 5760px\" \/><\/p>\n<h2><b>\ud83d\udccd IP Geolocation API<\/b><\/h2>\n<p><a href=\"https:\/\/ipgeolocationapi.com\/\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">IP Geolocation API<\/span><\/a><span style=\"font-weight: 400;\"> is a child company of API Layer which was founded by Paul Zehetmayr in 2015. Since the launch of API Layer, it has come a long way and provides many amazing products like <\/span><strong><a href=\"https:\/\/ipstack.com\/\" rel=\"nofollow noopener\" target=\"_blank\">ipstack<\/a><\/strong><span style=\"font-weight: 400;\"> and <\/span><strong><a href=\"https:\/\/ipapi.com\/\" rel=\"nofollow noopener\" target=\"_blank\">ipapi<\/a><\/strong><span style=\"font-weight: 400;\">, etc. Among these products lies the IP Geolocation API that is a <strong>free real-time IP to Geolocation JSON API<\/strong> with detailed countries data integration.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">IP Geolocation API provides you with the geolocation of a user. Geolocation is the identification or estimation of the real-world geographic location of an internet-connected computer or device. This API also provides country information packaged as convenient JSON objects. This country information includes data from <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_3166\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">ISO 3166<\/span><\/a><span style=\"font-weight: 400;\"> (countries and states\/subdivisions ), <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_4217\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">ISO 4217<\/span><\/a><span style=\"font-weight: 400;\"> (currency), and last but not the least <\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/E.164\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">E.164<\/span><\/a><span style=\"font-weight: 400;\"> (phone number).<\/span>\u00a0\ud83d\udcaf<\/p>\n<div class=\"eckosc eckosc_full_width_block\">\n<p><a href=\"https:\/\/ipgeolocationapi.com\/\" rel=\"nofollow noopener\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7521\" src=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple.png\" alt=\"Ipgeolocation Thedevcouple\" width=\"1440\" height=\"811\" srcset=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple.png 1440w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-300x169.png 300w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-1024x577.png 1024w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-768x433.png 768w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-1240x698.png 1240w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-860x484.png 860w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-680x383.png 680w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-500x282.png 500w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-400x225.png 400w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-250x141.png 250w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-200x113.png 200w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-100x56.png 100w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-76x43.png 76w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/ipgeolocation-thedevcouple-50x28.png 50w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<\/div>\n<h2><b>\ud83d\udcbb Experimenting With The API<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Now it\u2019s time for me to show you how this API works. Just follow the steps below and you are good to go!<\/span><\/p>\n<h3><b>\u2192 Step #1<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The first thing you need to do is to open the <\/span><a href=\"https:\/\/ipgeolocationapi.com\/\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">IP Geolocation API<\/span><\/a><span style=\"font-weight: 400;\"> website. Once you have opened the site, scroll down to the <\/span><b>Usage,<\/b><span style=\"font-weight: 400;\"> and get your desired API endpoint. I am using the API with a <\/span><b><i>geolocate<\/i><\/b><span style=\"font-weight: 400;\"> endpoint to get data of the country I am living in right now.\u00a0<\/span><\/p>\n<div class=\"eckosc eckosc_full_width_block\">\n<p><a href=\"https:\/\/ipgeolocationapi.com\/\" rel=\"nofollow noopener\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7522\" src=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple.png\" alt=\"Usage Thedevcouple\" width=\"1440\" height=\"811\" srcset=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple.png 1440w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-300x169.png 300w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-1024x577.png 1024w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-768x433.png 768w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-1240x698.png 1240w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-860x484.png 860w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-680x383.png 680w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-500x282.png 500w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-400x225.png 400w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-250x141.png 250w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-200x113.png 200w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-100x56.png 100w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-76x43.png 76w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/usage-thedevcouple-50x28.png 50w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<\/div>\n<h3><b>\u2192 Step #2<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The next step is to write a simple program to hit the API. I am using JavaScript to make the API call. You can see the program below. Just copy it in your JavaScript file and run it by typing <\/span><b><i>node yourfilename.js<\/i><\/b><span style=\"font-weight: 400;\">. I have also included the response you will receive in the gist below. \u26a1\ufe0f<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code data-language=\"json\">\/\/ importing axios in the file\nconst axios = require('axios');\n\n\/\/ an asychronous function to make the API call\n(async () =&gt; {\n    await axios\n        .get('https:\/\/api.ipgeolocationapi.com\/geolocate')\n        .then(({ data }) =&gt; console.log(data))\n        .catch((err) =&gt; console.log(err));\n})();\n\n\/* Response\n\n{ continent: 'Asia',\n  alpha2: 'PK',\n  alpha3: 'PAK',\n  country_code: '92',\n  international_prefix: '00',\n  ioc: 'PAK',\n  gec: 'PK',\n  name: 'Pakistan',\n  national_destination_code_lengths: [ 2 ],\n  national_number_lengths: [ 9, 10 ],\n  national_prefix: '0',\n  number: '586',\n  region: 'Asia',\n  subregion: 'Southern Asia',\n  world_region: 'APAC',\n  un_locode: 'PK',\n  nationality: 'Pakistani',\n  postal_code: true,\n  unofficial_names: [ 'Pakistan', 'Paquist\u00e1n', '\u30d1\u30ad\u30b9\u30bf\u30f3' ],\n  languages_official: [ 'en', 'ur' ],\n  languages_spoken: [ 'en', 'ur' ],\n  geo:\n   { latitude: 30.375321,\n     latitude_dec: '29.923219680786133',\n     longitude: 69.345116,\n     longitude_dec: '69.35774230957031',\n     max_latitude: 37.084107,\n     max_longitude: 77.8316195,\n     min_latitude: 23.6344999,\n     min_longitude: 60.8729721,\n     bounds: { northeast: [Object], southwest: [Object] } },\n  currency_code: 'PKR',\n  start_of_week: 'monday' }\n\n*\/<\/code><\/pre>\n<h2><b>\ud83c\udfa9 API Features<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">After I made the API call to the IP Geolocation API, I received a JSON object with geolocation information about myself. I am going to discuss each of these pieces of information in detail now.<\/span><\/p>\n<ul>\n<li><b>\ud83c\udf0e Continent<span style=\"font-weight: 400;\">: This shows you from which continent the user is accessing your website or using your product.\u00a0<\/span><\/b><\/li>\n<li><strong>\ud83d\ude80 Alpha2 &amp; Alpha3:<\/strong><span style=\"font-weight: 400;\"> The next thing you will see is alpha2 and alpha3. These are ISO standards and two letters and three letters country name code. The response I received was PK and PAK since I am residing in Pakistan. You can see a list of these codes <\/span><a href=\"https:\/\/gist.github.com\/tadast\/8827699\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">here<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udcde Country Code:<\/strong><span style=\"font-weight: 400;\"> IP Geolocation API also provides you with the country code of the user visiting your website or product. The country code is the code you use before making a phone call to an international cell number.\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\u260e\ufe0f International Prefix:<\/strong><span style=\"font-weight: 400;\"> An international prefix is a telephone dialing code used to dial out of the country when making an international call. It is also called the international access code. This is done to avoid confusing the country code with the first few digits of a local phone number.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udca1 International Olympic Committee (IOC):<\/strong><span style=\"font-weight: 400;\"> IOC is the three-letter abbreviation of the country code for the Olympic participants. Since I am in Pakistan, the API gave me a PAK response when I made the API call.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udca5 General Embargoed Countries (GEC):<\/strong><span style=\"font-weight: 400;\"> Just like IOC, GEC is also a country abbreviation but with two letters.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udd25 Name:<\/strong><span style=\"font-weight: 400;\"> The information gives you the name of the country your user is visiting your website or product. You can use this information on a product website to offer a different percentage of the discount.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\u26a1\ufe0f National Destination Code Length:<\/strong><span style=\"font-weight: 400;\"> This is the length of the national destination code. The National destination code identifies the number plan area that is to be used by the user.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\u2706 National Prefix:<\/strong><span style=\"font-weight: 400;\"> This is the digit or a combination of digits that must be dialed before an area code when dialing a call to a subscriber from inside his own country but outside his own numbering area.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83c\udf10 Region<\/strong>: <span style=\"font-weight: 400;\">This is the area of the world from where your user is accessing your product. Since I am in Asia, I received <\/span><i><span style=\"font-weight: 400;\">Asia <\/span><\/i><span style=\"font-weight: 400;\">in response.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83c\udf0d Subregion:<\/strong> <span style=\"font-weight: 400;\">IP Geolocation API also provides you with a more precise location of your user. I am in Pakistan which is in Southern Asia.\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83c\udf0e World Region:<\/strong><span style=\"font-weight: 400;\"> A world region is a large primary division of the world primarily used in higher education like anthropology, geography, and history. I get the APAC as a response which stands for the Asia Pacific region of the world.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\ude9d UN\/Locode:<\/strong> <span style=\"font-weight: 400;\">This is the United National Code for trade and transport Locations. It is a geographic coding scheme developed and maintained by the United Nations Economic Commission for Europe.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83c\udde8\ud83c\udde6\ud83c\udde6\ud83c\uddfa Nationality:<\/strong> <span style=\"font-weight: 400;\">It is the nationality of the user which is accessing your product embedded with this API or hitting it directly. It is not always true since if an American is living in Germany and hitting the API, it will get german as his nationality.\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\u2709\ufe0f Postal Code:<\/strong> <span style=\"font-weight: 400;\">If the postal code exists for the country you are living in, you will get true. Otherwise, you will get false.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\u26a0\ufe0f Unofficial Name:<\/strong> <span style=\"font-weight: 400;\">This is an array that contains the unofficial names of your country. You can see in the response above that for Pakistan, there are three unofficial names.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udce2 Languages Official:<\/strong> <span style=\"font-weight: 400;\">This is also an array that contains the language code of the official languages of the country you are living in while making the API call.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udde3 Languages Spoken:<\/strong> <span style=\"font-weight: 400;\">This array includes the languages spoken in your country. The response I received had two languages, i.e., Urdu and English.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udccc Geo:<\/strong> <span style=\"font-weight: 400;\">Geo is an object which contains the latitudes and longitudes of your country. These coordinates can help you to pinpoint the location of your user.<\/span><\/li>\n<\/ul>\n<ul>\n<li><strong>\ud83d\udcb0 Currency Code:<\/strong> <span style=\"font-weight: 400;\">Every country has a currency. For instance, for the United States for America, it is dollars. For England, it is the pound. This piece of information shows you the currency code of the country from where your user is visiting your website.<\/span><\/li>\n<li><strong>\ud83d\udcc6 Start Of Week:<\/strong> <span style=\"font-weight: 400;\">It is self-explanatory. This information will tell you what\u2019s the start of the week in the country where the user is visiting.<\/span><\/li>\n<\/ul>\n<h2><b>\ud83d\udd17 API Endpoints<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">IP Geolocation API provides its users with different endpoints which they can use to get the desired information they need. Currently, they provide four different endpoints. I am now going to discuss each of them in detail now.<\/span><\/p>\n<h3><b>\ud83d\udccd Geolocate<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">When you make the API call using this endpoint, you will get the information about the country from where you are making the call. This is useful for geolocating users in the frontend without the need to detect their actual IP yourself.<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code>GET https:\/\/api.ipgeolocationapi.com\/geolocate HTTP\/1.1<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">I have already added the response in the gist above. Just scroll up and take a look!<\/span><\/p>\n<h3><b>\ud83d\udd25 Geolocating With IPv4 or IPv6<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">This endpoint will help you to geolocate any IPv4 or IPv6. For instance, if you have an IP and need a complete geo analysis, you can use this API to make that happen.<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code data-language=\"json\">GET https:\/\/api.ipgeolocationapi.com\/geolocate\/91.213.103.0 HTTP\/1.1\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">You will get a response something like this one.<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code data-language=\"json\">{ continent: 'Europe',\n  address_format:\n   '{{recipient}}\\n{{street}}\\n{{postalcode}} {{city}}\\n{{country}}',\n  alpha2: 'DE',\n  alpha3: 'DEU',\n  country_code: '49',\n  international_prefix: '00',\n  ioc: 'GER',\n  gec: 'GM',\n  name: 'Germany',\n  national_destination_code_lengths: [ 2, 3, 4, 5 ],\n  national_number_lengths: [ 6, 7, 8, 9, 10, 11 ],\n  national_prefix: '0',\n  number: '276',\n  region: 'Europe',\n  subregion: 'Western Europe',\n  world_region: 'EMEA',\n  un_locode: 'DE',\n  nationality: 'German',\n  eu_member: true,\n  eea_member: true,\n  vat_rates:\n   { standard: 19,\n     reduced: [ 7 ],\n     super_reduced: null,\n     parking: null },\n  postal_code: true,\n  unofficial_names:\n   [ 'Germany',\n     'Deutschland',\n     'Allemagne',\n     'Alemania',\n     '\u30c9\u30a4\u30c4',\n     'Duitsland' ],\n  languages_official: [ 'de' ],\n  languages_spoken: [ 'de' ],\n  geo:\n   { latitude: 51.165691,\n     latitude_dec: '51.20246505737305',\n     longitude: 10.451526,\n     longitude_dec: '10.382203102111816',\n     max_latitude: 55.0815,\n     max_longitude: 15.0418962,\n     min_latitude: 47.2701115,\n     min_longitude: 5.8663425,\n     bounds: { northeast: [Object], southwest: [Object] } },\n  currency_code: 'EUR',\n  start_of_week: 'monday' }<\/code><\/pre>\n<h3><b>\ud83c\uddfb\ud83c\uddec Countries<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">If you are interested in getting information about all the countries in the world, you can then use this endpoint. All you need to do is make an API call to it and save the result in a variable and you are good to go.<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code data-language=\"json\">GET https:\/\/api.ipgeolocationapi.com\/countries HTTP\/1.1\n<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">I am not going to display the information you will receive here. It is because the information is about <strong>195 countries<\/strong> which are too long to display.\u00a0<\/span><\/p>\n<h3><b>\ud83c\udfa9 Geolocating With Country Code\u00a0<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Earlier I discussed Alpha2 which is an ISO standard. You can use these codes to get information about any country you like.\u00a0<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code>GET https:\/\/api.ipgeolocationapi.com\/countries\/de HTTP\/1.1<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">You will get this response if you hit this endpoint. \ud83d\udcaf<\/span><\/p>\n<pre class=\"eckosc_syntax eckosc_syntax_theme_dark\"><code data-language=\"json\">{ continent: 'North America',\n  address_format:\n   '{{recipient}}\\n{{street}}\\n{{city}} {{region_short}} {{postalcode}}\\n{{country}}',\n  alpha2: 'US',\n  alpha3: 'USA',\n  country_code: '1',\n  international_prefix: '011',\n  ioc: 'USA',\n  gec: 'US',\n  name: 'United States of America',\n  national_destination_code_lengths: [ 3 ],\n  national_number_lengths: [ 10 ],\n  national_prefix: '1',\n  number: '840',\n  region: 'Americas',\n  subregion: 'Northern America',\n  world_region: 'AMER',\n  un_locode: 'US',\n  nationality: 'American',\n  postal_code: true,\n  unofficial_names:\n   [ 'United States',\n     'Vereinigte Staaten von Amerika',\n     '\u00c9tats-Unis',\n     'Estados Unidos',\n     '\u30a2\u30e1\u30ea\u30ab\u5408\u8846\u56fd',\n     'Verenigde Staten' ],\n  languages_official: [ 'en' ],\n  languages_spoken: [ 'en' ],\n  geo:\n   { latitude: 37.09024,\n     latitude_dec: '39.44325637817383',\n     longitude: -95.712891,\n     longitude_dec: '-98.95733642578125',\n     max_latitude: 71.5388001,\n     max_longitude: -66.885417,\n     min_latitude: 18.7763,\n     min_longitude: 170.5957,\n     bounds: { northeast: [Object], southwest: [Object] } },\n  currency_code: 'USD',\n  start_of_week: 'sunday' }<\/code><\/pre>\n<h2><b>\ud83d\udd25 Performance<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Now let\u2019s talk about the performance of IP Geolocation API. A geolocation API performance and response time are extremely important especially if you are using it on your website to show country-specific content.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I am using Postman for this performance test. I have run several tests with different country codes and IP addresses. The following is the result I acquired. These results are the average of many tests I performed.<\/span><\/p>\n<div class=\"eckosc eckosc_contrast_block\"><div class=\"eckosc_contrast_block_inner\">\n<p style=\"text-align: center;\">\ud83d\udca1<\/p>\n<ul>\n<li style=\"font-weight: 400; text-align: left;\">\u26a1\ufe0f On the first test, I received a response time of <strong>197ms<\/strong> which is pretty impressive.<\/li>\n<li style=\"font-weight: 400; text-align: left;\">\ud83d\ude80 I then tested for different alpha2 codes and the response time never went above <strong>200ms<\/strong>.<\/li>\n<\/ul>\n<\/div><\/div>\n<p><span style=\"font-weight: 400;\">200ms is blazing fast. IP Geolocation API has ensured that you don\u2019t face any downtime while using their API.<\/span><\/p>\n<div class=\"eckosc eckosc_full_width_block\">\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-7523\" src=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple.png\" alt=\"Performance Thedevcouple\" width=\"1440\" height=\"811\" srcset=\"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple.png 1440w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-300x169.png 300w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-1024x577.png 1024w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-768x433.png 768w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-1240x698.png 1240w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-860x484.png 860w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-680x383.png 680w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-500x282.png 500w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-400x225.png 400w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-250x141.png 250w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-200x113.png 200w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-100x56.png 100w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-76x43.png 76w, https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/performance-thedevcouple-50x28.png 50w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/p>\n<\/div>\n<h2><b>\ud83d\udcd6 Documentation<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">IP Geolocation API does not provide any documentation of its API and endpoints. This is one of the downsides I saw while I was using it. I had to google many of the response features. It would be extremely helpful for the users of this API if they have some kind of guide that will help them understand the information they are receiving from the API.<\/span><\/p>\n<h2><b>\ud83d\ude4c\ud83c\udffb Wrapping Up<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">I must say this is an extremely powerful free tool for getting geolocation of customers. It has made the lives of so many developers easier by providing the geolocate endpoint to identify their user\u2019s location. It is also lightning fast and ensures that you get your desired results in time without any lag.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The one thing which I found lacking was the documentation which I mentioned above. I am sure that if IP Geolocation API covers this part of the product too then their API will be a huge success.\u00a0<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">Have you used the IP Geolocation API or similar tool before? Which service did you use and how was your experience? Let us know your thoughts in the comments section below.<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">Peace! \ud83e\udd1e<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IP Geolocation API provides you with the geolocation of a user. Geolocation is the identification or estimation of the real-world geographic location of an internet-connected computer or device.<\/p>\n","protected":false},"author":9,"featured_media":7520,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":""},"categories":[18],"tags":[222,224,223],"coauthors":[214],"jetpack_featured_media_url":"https:\/\/thedevcouple.com\/wp-content\/uploads\/2020\/05\/cover-scaled.jpg","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/posts\/7518"}],"collection":[{"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/comments?post=7518"}],"version-history":[{"count":5,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/posts\/7518\/revisions"}],"predecessor-version":[{"id":7582,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/posts\/7518\/revisions\/7582"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/media\/7520"}],"wp:attachment":[{"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/media?parent=7518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/categories?post=7518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/tags?post=7518"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/thedevcouple.com\/api\/wp\/v2\/coauthors?post=7518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}