5 Free geolocation apis

5 Free Geolocation APIs to Retrieve User Coordinates in Latitude & Longitude

As each person has a unique id number; Each computer also finds its own IP address. The IP address indicates which address the computer is at, which service provider it is using, and which network it is connected to.

So in essence, IP addresses are identifiers that allow information to be sent between devices on a network. IP addresses basically contain the location information of the device and at the same time, they make the devices accessible so that they can communicate with the internet. The Internet, cell phones, and computers need a way to distinguish between devices with which we can access the Internet. IP addresses clearly meet this need with the information they provide. As a result, IP addresses play a very important role in the functioning of the Internet.

Today, when businesses want to obtain the location data of their visitors with the convenience provided by s, it is sufficient to obtain the IP addresses of their visitors. Best IP geolocation API are web services that provide location data corresponding to the IP address.

Geolocation API can provide detailed location data corresponding to IP addresses. For example, many businesses today also need the latitude and longitude coordinate information of the location of the visitors. Many geolocation APIs provide this service. In this article, we will examine the 5 most popular free geolocation APIs that provide the location information of your visitors in detail, including latitude and longitude information.

5 Free Geolocation APIs

Ipstack is the most preferred and most popular Geolocation API today. The API provided by Ipstack provides the most detailed information corresponding to the IP addresses. It provides the data of the IP address in just seconds, ensuring that there is no delay.

By offering Bulk IP query service, it can present location data of more than one IP address in a list.

Basically, the 3 services it provides are as follows:

Standard Lookup: Get the detailed data behind an IP address.

Bulk Lookup: Get the detailed data behind bulk IP addresses at once.

Requester Lookup: Get the detailed data behind the IP address your API request is coming from.

An example of geolocation information of Ipstack API is as follows.


{
    "ip": "46.178.0.0",
    "type": "ipv4",
    "continent_code": "EU",
    "continent_name": "Europe",
    "country_code": "BE",
    "country_name": "Belgium",
    "region_code": "VLG",
    "region_name": "Flanders",
    "city": "Meise",
    "zip": "1860",
    "latitude": 50.93404006958008,
    "longitude": 4.327270030975342,
    "location": {
        "geoname_id": 2791424,
        "capital": "Brussels",
        "languages": [
      {
        "code": "nl",
        "name": "Dutch",
        "native": "Nederlands"
      },
      {
        "code": "fr",
        "name": "French",
        "native": "Fran\u00e7ais"
      },
      {
        "code": "de",
        "name": "German",
        "native": "Deutsch"
      }
    ],
    "country_flag": "https://assets.ipstack.com/flags/be.svg",
    "country_flag_emoji": "\ud83c\udde7\ud83c\uddea",
    "country_flag_emoji_unicode": "U+1F1E7 U+1F1EA",
    "calling_code": "32",
    "is_eu": true
  },
  "time_zone": {
    "id": "Europe/Brussels",
    "current_time": "2022-12-10T15:08:41+01:00",
    "gmt_offset": 3600,
    "code": "CET",
    "is_daylight_saving": false
  },
  "currency": {
    "code": "EUR",
    "name": "Euro",
    "plural": "euros",
    "symbol": "\u20ac",
    "symbol_native": "\u20ac"
  },
  "connection": {
    "asn": 5432,
    "isp": "Proximus Nv"
  },
  "security": {
    "is_proxy": false,
    "proxy_type": null,
    "is_crawler": false,
    "crawler_name": null,
    "crawler_type": null,
    "is_tor": false,
    "threat_level": "low",
    "threat_types": null
  }
}
                        

The geolocation API provided by Positionstack is powered by a database containing more than 2 billion address information. Positionstack's database is updated regularly and its users are provided with the most up-to-date data.

Thanks to Positionstack's powerful technological infrastructure, geographic location information can be returned in either JSON or XML format. The output of a sample positionstack API geolocation information in JSON format is as follows.


{
    "data": [
    {
        "latitude": 40.990587,
        "longitude": 29.022045,
        "type": "venue",
        "name": "Kadıköy",
        "number": null,
        "postal_code": null,
        "street": null,
        "confidence": 1,
        "region": "Istanbul",
        "region_code": "IB",
        "county": "Üsküdar",
        "locality": "Acıbadem",
        "administrative_area": null,
        "neighbourhood": "Caferağa",
        "country": "Turkey",
        "country_code": "TUR",
        "continent": "Asia",
        "label": "Kadıköy, Acıbadem, IB, Turkey",
        "bbox_module": [
        
      ],
      "country_module": {
        "latitude": 39.05101013183594,
        "longitude": 34.93033981323242,
        "common_name": "Turkey",
        "official_name": "Republic of Turkey",
        "capital": "Ankara",
        "flag": "🇹🇷",
        "area": 783562,
        "landlocked": false,
        "independent": true,
        "global": {
            "alpha2": "TR",
            "alpha3": "TUR",
            "numeric_code": "792",
            "region": "Asia",
            "subregion": "Western Asia",
            "region_code": "142",
            "subregion_code": "145",
            "world_region": "EMEA",
            "continent_name": "Asia",
            "continent_code": "AS"
        },
        "dial": {
            "calling_code": "90",
            "national_prefix": "0",
            "international_prefix": "00"
        },
        "currencies": [
          {
            "symbol": "₺",
            "code": "TRY",
            "name": "Turkish Lira",
            "numeric": 949,
            "minor_unit": 2
          }
        ],
        "languages": {
            "tur": "Turkish"
        }
      },
      "sun_module": {
        "rise": {
            "time": 1670649457,
            "astronomical": 1670643538,
            "civil": 1670647608,
            "nautical": 1670645540
        },
        "set": {
            "time": 1670682939,
            "astronomical": 1670688858,
            "civil": 1670684788,
            "nautical": 1670686856
        },
        "transit": 1670666198
      },
      "timezone_module": {
        "name": "Europe/Istanbul",
        "offset_sec": 10800,
        "offset_string": "+03:00"
      }
    }
  ]
}
                        

Today, Ipapi is actively used by more than 30 thousand businesses and developers. The geolocation API provided by Ipapi provides the most accurate geolocation data.

It is preferred by big companies such as Rebtel, Gengo and Uberflip. It is easily integrated into today's popular programming languages. An example of its integration into the Javascript programming language is as follows.


                        // set endpoint and your access key
                        var ip = '134.201.250.155'
                        var access_key = 'YOUR_ACCESS_KEY';

                        // get the API result via jQuery.ajax
                        $.ajax({
                            url: 'https://api.ipapi.com/' + ip + '?access_key=' + access_key,   
                            dataType: 'jsonp',
                            success: function(json) {

                                 // output the "calling_code" object inside "location"
                                alert(json.location.calling_code);
            
        }
    });
                        

The example response of Ipapi API in JSON format for geolocation information is as follows.


{
    "ip": "46.178.0.0",
    "hostname": "0-0-178-46.mobileinternet.proximus.be",
    "type": "ipv4",
    "continent_code": "EU",
    "continent_name": "Europe",
    "country_code": "BE",
    "country_name": "Belgium",
    "region_code": "VLG",
    "region_name": "Flanders",
    "city": "Meise",
    "zip": "1860",
    "latitude": 50.93404006958008,
    "longitude": 4.327270030975342,
    "location": {
        "geoname_id": 2791424,
        "capital": "Brussels",
        "languages": [
      {
        "code": "nl",
        "name": "Dutch",
        "native": "Nederlands"
      },
      {
        "code": "fr",
        "name": "French",
        "native": "Fran\u00e7ais"
      },
      {
        "code": "de",
        "name": "German",
        "native": "Deutsch"
      }
    ],
    "country_flag": "https://assets.ipstack.com/flags/be.svg",
    "country_flag_emoji":"\ud83c\udde7\ud83c\uddea",
    "country_flag_emoji_unicode": "U+1F1E7 U+1F1EA",
    "calling_code": "32",
    "is_eu": true
  },
  "time_zone": {
    "id": "Europe/Brussels",
    "current_time": "2022-12-10T16:16:38+01:00",
    "gmt_offset": 3600,
    "code": "CET",
    "is_daylight_saving": false
  },
  "currency": {
    "code": "EUR",
    "name": "Euro",
    "plural": "euros",
    "symbol": "\u20ac",
    "symbol_native": "\u20ac"
  },
  "connection": {
     "asn": 5432,
    "isp": "Proximus Nv"
  },
  "security": {
    "is_proxy": false,
    "proxy_type": null,
    "is_crawler": false,
    "crawler_name": null,
    "crawler_type": null,
    "is_tor": false,
    "threat_level": "low",
    "threat_types": null
  }
}
                        

Ipgeolocation is another web service that provides geolocation information corresponding to IP address free of charge. It has an infrastructure that can provide geolocation information in JSON and XML format.

Ipgeolocation API provides detailed information about the location corresponding to the IP address. It can provide information such as country, city, latitude, longitude, currency, zip code of your location in a single request.

It is used by many businesses, especially organizations such as IATA, Vmware and Ikea.

In addition to all this, the Astronomy API provided by Ipgeolocation, it also provides timing information such as sunrise, sunset, moonset and moonrise for the IP address.

Here is an example geolocation response from the Ipgeolocation API.


{
    "ip": "95.65.135.201",
    "hostname": "95.65.135.201",
    "continent_code": "AS",
    "continent_name": "Asia",
    "country_code2": "TR",
    "country_code3": "TUR",
    "country_name": "Turkey",
    "country_capital": "Ankara",
    "state_prov": "Istanbul",
    "district": "",
    "city": "Istanbul",
    "zipcode": "34363",
    "latitude": "41.06201",
    "longitude": "28.98877",
    "is_eu": false,
    "calling_code": "+90",
    "country_tld": ".tr",
    "languages": "tr-TR,ku,diq,az,av",
    "country_flag": "https://ipgeolocation.io/static/flags/tr_64.png",
    "geoname_id": "10238152",
    "isp": "VODAFONE NET ILETISIM HIZMETLERI ANONIM SIRKETI",
    "connection_type": "",
    "organization": "VODAFONE NET ILETISIM HIZMETLERI ANONIM SIRKETI",
    "asn": "AS8386",
    "currency": {
        "code": "TRY",
        "name": "Turkish Lira",
        "symbol": "₺"
  },
  "time_zone": {
    "name": "Europe/Istanbul",
    "offset": 3,
    "current_time": "2022-12-10 18:18:24.021+0300",
    "current_time_unix": 1670685504.021,
    "is_dst": false,
    "dst_savings": 0
  }
}
                        

Finally, Ipdata is another web service that allows you to obtain the geolocation information of your visitors for free today.

It contains a lot of detailed information about geographical location. The most important of these is that it provides the accuracy of the geographical area data corresponding to the IP address. Thanks to its advanced infrastructure, it can detect whether the entered IP address is VPN or Proxy.

The output of detailed geolocation data provided by Ipdata in JSON format is as follows.


{
    "ip": "46.178.0.0",
    "is_eu": true,
    "city": "Schoten",
    "region": "Flemish Region",
    "region_code": "VLG",
    "region_type": "region",
    "country_name": "Belgium",
    "country_code": "BE",
    "continent_name": "Europe",
    "continent_code": "EU",
    "latitude": 51.24869918823242,
    "longitude": 4.502200126647949,
    "postal": "2900",
    "calling_code": "32",
    "flag": "https://ipdata.co/flags/be.png",
    "emoji_flag": "🇧🇪",
    "emoji_unicode": "U+1F1E7 U+1F1EA",
    "asn": {
        "asn": "AS5432",
        "name": "Proximus Nv",
        "domain": "proximus.com",
        "route": "46.178.0.0/15",
        "type": "business"
  },
  "company": {
    "name": "Proximus Mobile Internet",
    "domain": "proximus.be",
     "network": "46.178.0.0/16",
    "type": "business"
  },
  "carrier": {
    "name": "Proximus",
    "mcc": "206",
    "mnc": "1"
  },
  "languages": [
    {
         "name": "Dutch",
        "native": "Nederlands",
        "code": "nl"
    },
    {
        "name": "French",
        "native": "Français",
        "code": "fr"
    },
    {
        "name": "German",
        "native": "Deutsch",
        "code": "de"
    }
  ],
  "currency": {
    "name": "Euro",
    "code": "EUR",
    "symbol": "€",
    "native": "€",
    "plural": "euros"
  },
  "time_zone": {
    "name": "Europe/Brussels",
    "abbr": "CET",
    "offset":"+0100",
    "is_dst": false,
    "current_time": "2022-12-10T15:28:46+01:00"
  },
  "threat": {
    "is_tor": false,
     "is_vpn": false,
    "is_icloud_relay": false,
    "is_proxy": false,
     "is_datacenter": false,
    "is_anonymous": false,
    "is_known_attacker": false,
    "is_known_abuser": false,
    "is_threat": false,
    "is_bogon": false,
    "blocklists": [
      
    ],
    "scores": {
        "vpn_score": 33,
        "proxy_score": 2,
        "threat_score": 3,
        "trust_score": 88
    }
  }
}