Currently we're handling more than 1000 requests per second!
Buy us a Coffee

Free IP API

Free, Fast and Reliable IP Geolocation API.
Easy to use and available in JSON

{
    "ipVersion": "4",
    "ipAddress": "44.200.145.223",
    "latitude": "39.039474",
    "longitude": "-77.491806",
    "countryName": "United States of America",
    "countryCode": "US",
    "timeZone": "-04:00",
    "zipCode": "20146",
    "cityName": "Ashburn",
    "regionName": "Virginia",
}
            

How to Use

The API accepts GET and POST methods and you can pass ip field as body or query param. However, If you don't pass the ip field we'll use the sender's ip address to extract the information.

Public IP Address

This will return your public IP Address

curl freeipapi.com

Javascript

fetch('https://freeipapi.com/api/json', {
  method: 'GET'
})
.then(response => response.json())
.then(data => {
  console.log('Success:', data);
})
.catch((error) => {
  console.error('Error:', error);
});

Javascript - Jquery

$.get( "https://freeipapi.com/api/json", function (data) {
  console.log(data)
});

PHP

$req = file_get_contents('https://freeipapi.com/api/json/8.8.8.8');
$data = json_decode($req, true);
print_r($data);

Curl

curl https://freeipapi.com/api/json/1.1.1.1

Rate Limit

The rate limit is maximum 60 requests per minute for one IP address and if you reach the limit, You will receive a 429 HTTP error code in the response.

To increase the limit you can contact us

Database

We're using ip2location free databases. We update the databases everyday.