Find an API

Search public APIs with auth details & Postman guides

← All APIs

IP-API

ip-api.com · Developer Tools

Developer Tools No Auth Free & Open IP Geolocation Network

IP geolocation API — get country, region, city, ISP, timezone, and coordinates from any IP address. Free for non-commercial use, no API key required. 45 requests/minute limit.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Geolocate an IP

Get geolocation for Google's DNS server.

http://ip-api.com/json/8.8.8.8

Hover any highlighted part to learn what it does

curl -X GET "http://ip-api.com/json/8.8.8.8"
import requests
response = requests.get(
    "http://ip-api.com/json/8.8.8.8",
)
print(response.json())
const url = 'http://ip-api.com/json/8.8.8.8';

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "http://ip-api.com/json/8.8.8.8"
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("http://ip-api.com/json/8.8.8.8")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "http://ip-api.com/json/8.8.8.8";
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Geolocate caller's IP

Get geolocation for the requesting IP (your own).

http://ip-api.com/json

Hover any highlighted part to learn what it does

curl -X GET "http://ip-api.com/json"
import requests
response = requests.get(
    "http://ip-api.com/json",
)
print(response.json())
const url = 'http://ip-api.com/json';

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	targetURL := "http://ip-api.com/json"
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("http://ip-api.com/json")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "http://ip-api.com/json";
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed (HTTP only — HTTPS requires paid plan)
  2. Try GET http://ip-api.com/json/1.1.1.1
  3. Omit IP to geolocate yourself: GET http://ip-api.com/json
  4. Add ?fields=city,country,lat,lon to select specific fields

Open documentation ↗