ip-api API

Beginner's Pick Geocoding / No Auth Required Beginner HTTP
Free to Use
57 C
Measured Score 0 50 100 Speed 21/30 Consistency 17/20 Security 0/20 Browser access 15/15 Transparency 4/15 TESTED 2026-08-10

Overview

ip-api provides fast, free IP geolocation data including country, city, region, ISP, and coordinates for any public IP or domain name. It requires no API key for basic usage and supports both JSON and XML responses. The free tier is limited to 45 requests per minute from non-commercial use.

Beginner Tip

You can look up your own IP by calling http://ip-api.com/json (no IP needed) — great for testing. Note that ip-api requires HTTP (not HTTPS) on the free tier; HTTPS is only available on paid plans.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET http://ip-api.com/json/8.8.8.8
Result
HTTP 200 · application/json · 277 bytes
Response time
109 ms (median of 3) · fastest 100 ms
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
status string success
country string United States
countryCode string US
region string VA
regionName string Virginia
city string Ashburn
zip string 20149
lat number 39.03
lon number -77.5
timezone string America/New_York
isp string Google LLC
org string Google Public DNS
as string AS15169 Google LLC
query string 8.8.8.8

Captured Response

Captured from a real request to http://ip-api.com/json/8.8.8.8 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "status": "success",
  "country": "United States",
  "countryCode": "US",
  "region": "VA",
  "regionName": "Virginia",
  "city": "Ashburn",
  "zip": "20149",
  "lat": 39.03,
  "lon": -77.5,
  "timezone": "America/New_York",
  "isp": "Google LLC",
  "org": "Google Public DNS",
  "as": "AS15169 Google LLC",
  "query": "8.8.8.8"
}

Field Reference

status "success" if the lookup worked, "fail" if the IP was invalid or private.
country Full country name for the IP address.
countryCode ISO 3166-1 alpha-2 two-letter country code.
city Estimated city name for the IP location.
isp Internet Service Provider name for the IP.
lat Approximate latitude of the IP location.
lon Approximate longitude of the IP location.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "http://ip-api.com/json/8.8.8.8";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

fail status with "private range" message You passed a private or reserved IP address like 192.168.1.1.
Use a public IP address. Omit the IP entirely to auto-detect the caller's IP.
429 / rate limit exceeded More than 45 requests per minute from the same IP.
Add a delay between requests or purchase a pro plan for higher limits.
SSL/HTTPS error The free tier does not support HTTPS.
Use http:// instead of https:// for free-tier requests, or subscribe to the pro plan for HTTPS access.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 21/30
Consistency 17/20
Security 0/20
Browser access 15/15
Transparency 4/15
Endpoint Response Time 109ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS UNKNOWN
Category Geocoding
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →