BYTETOOLS

ip-api.com API

Free IP geolocation API returning country, city, coordinates, timezone and ISP for any IP. No key on the free tier, 45 requests per minute. Tested curl example.

No API key requiredCORS enabledFree tier

Endpoint tested and returned HTTP 200 on 19 Aug 2026

What is the ip-api.com API?

ip-api.com is a free IP geolocation API that returns country, region, city, latitude, longitude, timezone, ISP and organisation for any IP address. The free tier needs no API key but is limited to 45 requests per minute and HTTP only.

ip-api.com is the most generous no-signup IP geolocation service still operating, returning a genuinely detailed record — down to ISP, autonomous system and timezone — from a single unauthenticated request.

There is one important constraint that catches people out: the free endpoint is HTTP only. HTTPS requires a paid plan, which means you cannot call the free tier directly from a browser on an HTTPS page without triggering mixed-content blocking. Call it server-side instead.

Quick facts

Base URL
http://ip-api.com/json
Authentication
No key on the free tier. Free use is limited to non-commercial purposes; commercial use requires a paid plan.
Rate limit
45 requests per minute per IP. Exceeding it returns HTTP 429 and can trigger a temporary ban.
Pricing
Free for non-commercial use over HTTP. Paid plans add HTTPS, higher limits and commercial rights.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the ip-api.com API

Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.

1. Geolocate Google's public DNS server

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

curl
curl 'http://ip-api.com/json/8.8.8.8'
JavaScript (fetch)
const res = await fetch("http://ip-api.com/json/8.8.8.8");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("http://ip-api.com/json/8.8.8.8", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "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"
}

Parameters

ParameterTypeRequiredDescription
<ip>pathOptionalIP or domain to look up. Omit to geolocate the caller. 8.8.8.8
fieldsstringOptionalComma-separated field list or a numeric bitmask, to shrink the response. status,country,city,isp
langstringOptionalResponse language for country and region names. en

Response fields

statusstring
`success` or `fail`. Always check this first — failures still return HTTP 200.
country / countryCodestring
Country name and ISO alpha-2 code.
regionName / city / zipstring
Administrative region, city and postal code, all approximate.
lat / lonfloat
Approximate coordinates — city-level centroid, not a precise position.
timezonestring
IANA timezone identifier.
isp / org / asstring
Internet service provider, organisation and autonomous system.

What you can build with the ip-api.com API

  • Redirect visitors to a country-specific site version or currency
  • Flag logins from unexpected countries for fraud review
  • Pre-fill a country field in checkout or signup forms
  • Enrich server logs and analytics with approximate geography

Common errors and how to fix them

status: fail

Reserved, private or invalid IP address. Returned with HTTP 200, not an error code.

Fix: Check `status` before reading other fields; read the `message` field for the reason.

429

More than 45 requests in a minute.

Fix: Throttle client-side and cache per IP — geolocation for an address rarely changes.

Mixed content blocked

You called the HTTP endpoint from an HTTPS page.

Fix: Call it from your server, not the browser. HTTPS needs a paid plan.

ip-api.com API — frequently asked questions

Is ip-api.com free to use?

It is free for non-commercial use with no API key, limited to 45 requests per minute over HTTP. Commercial use, HTTPS and higher limits require a paid plan.

Why does ip-api.com return HTTP 200 when the lookup failed?

It signals failure in the JSON body rather than the status code. Always check that `status` equals `success` before reading any other field.

How accurate is IP geolocation?

Country accuracy is typically above 95%, but city accuracy is far lower and the coordinates are a regional centroid, not a real location. VPNs, mobile carriers and corporate proxies all break it. Never use it for anything requiring real precision.

Can I use ip-api.com from browser JavaScript?

Only over HTTP, which browsers block on HTTPS pages as mixed content. In practice you should call it from your backend and pass the result to the client.

Tools that pair with this API

Alternatives to ip-api.com API

If ip-api.com does not fit, these geolocation & ip apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
ipifyipify is a free, unlimited API that returns your public IP address as text, JSON or JSONP. No key, no rate limit, IPv4 and IPv6 endpoints. Live curl example.No keyYes19 Aug 2026
ipwho.isFree IP geolocation API with HTTPS and no API key. Returns country, city, coordinates, timezone, currency and connection data. 10,000 requests/month free.No keyYes19 Aug 2026
Nominatim (OpenStreetMap)Free OpenStreetMap geocoding API: convert addresses to coordinates and back. No API key, open data, 1 request per second. Tested curl example and usage policy.No keyNo19 Aug 2026
Zippopotam.usFree zip and postal code API for 60+ countries. Convert a postal code to city, state and coordinates with no API key. Tested curl example and live JSON response.No keyYes19 Aug 2026
ipapi.coFree IP geolocation API with no key: city, region, country, coordinates, timezone, currency, calling code and ASN in one JSON response. Tested example and live response.No keyYes21 Aug 2026
ipapi.isFree IP intelligence API with no key: geolocation plus VPN, proxy, Tor, datacentre and known-abuser detection, with ASN and company data. Tested example.No keyYes20 Aug 2026
All Geolocation & IP APIs

ip-api.com is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.