Free · No API key · CORS enabled

Free IP Address API

Get your public IP and location from any terminal, script or app. One request, no sign-up.

Try it in your terminal
$ curl ipchecker.io
203.0.113.42
Your live response from /jsonserved from Cloudflare's edge
Loading…

Endpoints

PathReturnsExample
/Your IP as plain text (for curl, wget, PowerShell)203.0.113.42
/jsonEverything as JSON: IP, city, region, country, ASN, ISP, time zone, coordinates{"ip":"203.0.113.42", …}
/ipYour IP as plain text (works in browsers too)203.0.113.42
/countryTwo-letter country codeNP
/cityCity nameKathmandu
/regionRegion or provinceBagmati
/asnAutonomous system numberAS17501
/orgISP or network operatorWorldLink Communications
/timezoneIANA time zoneAsia/Kathmandu
/locLatitude and longitude27.7172,85.3240
/postalPostal code44600
/headersThe HTTP request headers you sent, as JSON{"user-agent": …}

Examples

Bash
MY_IP=$(curl -s ipchecker.io)
curl -s ipchecker.io/json | jq .country_code
PowerShell
(Invoke-RestMethod https://ipchecker.io/json).ip
irm ipchecker.io/country
JavaScript
const r = await fetch("https://ipchecker.io/json");
const { ip, city, org } = await r.json();
Python
import requests
print(requests.get("https://ipchecker.io/json").json()["ip"])

Fair use

The API is free for personal projects, scripts and apps. Responses are never cached, so you always get the caller's current address. Location comes from Cloudflare's network data and is accurate to the city at best. Please don't send more than a few requests per second from one machine.

Frequently asked questions

How do I get my IP address from the command line?

Run curl ipchecker.io in any terminal. It prints your public IP as plain text. Use curl ipchecker.io/json for location and ISP details.

Is the IP API free?

Yes. There's no sign-up and no API key. It's meant for scripts, apps and everyday use.

Can I call the API from a web page?

Yes. Every endpoint sends CORS headers, so you can fetch https://ipchecker.io/json directly from browser JavaScript.

Does it support IPv6?

Yes. The API returns whichever address you connected with. Force one with curl -4 ipchecker.io or curl -6 ipchecker.io.