Free IP Address API

A free, key-less public IP API. Send one request and get the caller's public IP address plus geolocation, ISP and ASN. No signup, no API key, no rate-limit dashboard — and we never log your IP.

No API keyNo signupCORS-openNo loggingJSON · text · JSONP

Endpoint

GET
https://www.what-is-my-ip.best/api/ip

Returns the public IP of whoever calls it. Responses are sent with Access-Control-Allow-Origin: * and Cache-Control: no-store, so you can call it directly from browser JavaScript on any domain.

Quick start

curl — JSON
curl https://www.what-is-my-ip.best/api/ip
curl — plain text (just the IP)
curl https://www.what-is-my-ip.best/api/ip?format=text

JSON response

200 OK · application/json
{
  "ip": "203.0.113.42",
  "version": "IPv4",
  "city": "Amsterdam",
  "region": "North Holland",
  "country": "Netherlands",
  "country_code": "NL",
  "latitude": 52.3676,
  "longitude": 4.9041,
  "timezone": "Europe/Amsterdam",
  "asn": "AS3320",
  "org": "Deutsche Telekom AG"
}

Geolocation is an estimate based on IP registration data and may be null for some addresses. It is not GPS.

Formats

Code examples

JavaScript — fetch
const res = await fetch("https://www.what-is-my-ip.best/api/ip");
const data = await res.json();
console.log(data.ip); // "203.0.113.42"
Python — requests
import requests

data = requests.get("https://www.what-is-my-ip.best/api/ip").json()
print(data["ip"])
Node.js
const res = await fetch("https://www.what-is-my-ip.best/api/ip");
const { ip, country, org } = await res.json();
console.log(ip, country, org);
Shell — store your IP in a variable
MY_IP=$(curl -s https://www.what-is-my-ip.best/api/ip?format=text)
echo "$MY_IP"

Rate limits & fair use

The API is rate-limited to roughly 60 requests per minute per IP — generous for real use. Exceeding it returns HTTP 429 with a Retry-After header. Please cache responses where you can. The service is free; abuse spoils it for everyone.

Privacy

Your IP is used in-memory to build the response and is never logged, stored, or sold. See our Privacy Policy.

Want a drop-in widget instead?

Embed a live “your IP” badge on any site in one line.

Get the embed code →