IP Address Geolocation REST API

Looking for a free and simple REST API capable of geolocating your website visitors? This IP Address Lookup API service can process any IPv4 and IPv6 address and look up valuable data points within a fraction of a second. IP API results include country, city, ZIP code, lanaguage, currency, ASN, ISP, and many more.


3-Step Quickstart Guide

Step 1: Get a free account

To get started using the free IP API service, you first need to register for an API access key.
You can do so by clicking the link below and filling out the account form. No credit card required!

Get Free API Key

Step 2: Grab your API access key

As soon as you have an account, navigate to your Account Dashboard and grab your API access key.
Here's how API access key will be displayed:

IP-API access key

Step 3: Make your first API request

Once you have retrieved your API access key, you can start using the API.
Here is how to make a simple IP address lookup API request for the IP address 138.197.157.66, located in Toronto, Australia.

https://api.ipapi.com/api/138.197.157.66
    ? access_key = YOUR_ACCESS_KEY

After sucessfully making your API request, you will receive an API response within milliseconds.
Here is how your API response will look for the requested IP address:

{
   "ip":"138.197.157.66",
   "type":"ipv4",
   "continent_code":"NA",
   "continent_name":"North America",
   "country_code":"CA",
   "country_name":"Canada",
   "region_code":"ON",
   "region_name":"Ontario",
   "city":"Toronto",
   "zip":"M5A",
   "latitude":43.6555,
   "longitude":-79.3626,
   "location":{
      "geoname_id":6167865,
      "capital":"Ottawa",
      "languages":[
         {
            "code":"en",
            "name":"English",
            "native":"English"
         },
         {
            "code":"fr",
            "name":"French",
            "native":"Français"
         }
      ],
      "country_flag":"http://assets.ipapi.com/flags/ca.svg",
      "country_flag_emoji":"🇨🇦",
      "country_flag_emoji_unicode":"U+1F1E8 U+1F1E6",
      "calling_code":"1",
      "is_eu":false
   },
   "time_zone":{
      "id":"America/Toronto",
      "current_time":"2018-11-06T10:00:42-05:00",
      "gmt_offset":-18000,
      "code":"EST",
      "is_daylight_saving":false
   },
   "currency":{
      "code":"CAD",
      "name":"Canadian Dollar",
      "plural":"Canadian dollars",
      "symbol":"CA$",
      "symbol_native":"$"
   },
   "connection":{
      "asn":14061,
      "isp":"DigitalOcean, LLC"
   }
}