Free IP Lookup API

Your public IP, location, ISP and VPN or proxy status in one request.
No sign-up and no API key.

curl checkip.me

Quick start

Your IP
$ curl checkip.me
203.0.113.42
Details for your IP
$ curl checkip.me/json
{"ip": "203.0.113.42", "country": ...}
Details for any IP
$ curl checkip.me/8.8.8.8
{"ip": "8.8.8.8", "isp": "Google LLC", ...}
Just one field
$ curl checkip.me/8.8.8.8/country
United States

Works on Linux, macOS and Windows 10/11, which ship with curl.exe. Add -4 or -6 to force IPv4 or IPv6.

Endpoints

All endpoints use GET. Command-line clients can use HTTP or HTTPS.

EndpointReturns
checkip.meYour IP address as plain text
checkip.me/ipYour IP address as plain text, in browsers too
checkip.me/jsonDetails for your IP (JSON)
checkip.me/{ip}Details for any IP (JSON)
checkip.me/{field}One field for your IP, plain text
checkip.me/{ip}/{field}One field for any IP, plain text
checkip.me/helpCommand-line usage
Full response (nested JSON)
api.checkip.me/check.php?ip={ip}All available data for any IP
api.checkip.me/whoami.phpAll available data for your IP

Response

GET checkip.me/8.8.8.8
{
    "ip": "8.8.8.8",
    "hostname": "dns.google",
    "asn": "AS15169",
    "isp": "Google LLC",
    "organisation": "Level 3",
    "type": "Business",
    "range": "8.8.8.0/24",
    "continent": "North America",
    "country": "United States",
    "country_code": "US",
    "region": "California",
    "region_code": "CA",
    "city": "Mountain View",
    "postal_code": "94043",
    "latitude": 37.422,
    "longitude": -122.085,
    "timezone": "America/Los_Angeles",
    "currency": "USD",
    "proxy": false,
    "vpn": false,
    "tor": false,
    "hosting": false,
    "compromised": false,
    "scraper": false,
    "anonymous": true,
    "risk": 100,
    "operator": null,
    "docs": "https://checkip.me/api"
}
Fields
ipThe IP address you looked up
asn, isp, organisationNetwork and owner
typeResidential, Business, Wireless, Hosting
countrycityApproximate location
latitude, longitudeApproximate coordinates
timezone, currencyIANA timezone, ISO 4217 code
proxy, vpn, tortrue when detected
hostingData center or cloud IP
compromised, scraper, anonymousOther risk signals
riskRisk score from 0 to 100. Higher means riskier.
operatorVPN or proxy provider, when known
docsLink to this documentation

Unknown values are null. Any field can be fetched on its own as plain text, for example checkip.me/8.8.8.8/isp or checkip.me/vpn.

Full response: api.checkip.me/check.php?ip=8.8.8.8
{
    "status": "ok",
    "node": "Checkip.me",
    "8.8.8.8": {
        "network": {
            "asn": "AS15169",
            "range": "8.8.8.0/24",
            "hostname": "dns.google",
            "provider": "Google LLC",
            "organisation": "Level 3",
            "type": "Business"
        },
        "location": {
            "continent_name": "North America",
            "continent_code": "NA",
            "country_name": "United States",
            "country_code": "US",
            "region_name": "California",
            "region_code": "CA",
            "city_name": "Mountain View",
            "postal_code": "94043",
            "latitude": 37.422,
            "longitude": -122.085,
            "timezone": "America/Los_Angeles",
            "currency": { "name": "Dollar", "code": "USD", "symbol": "$" }
        },
        "device_estimate": { "address": 10, "subnet": 60 },
        "detections": {
            "proxy": false,
            "vpn": false,
            "compromised": false,
            "scraper": false,
            "tor": false,
            "hosting": false,
            "anonymous": true,
            "risk": 100,
            "confidence": 100,
            "first_seen": "2026-09-21T08:17:28Z",
            "last_seen": "2026-09-21T08:17:28Z",
            "times_seen": null
        },
        "detection_history": { "delisted": true, "delist_datetime": "2026-09-18T06:18:03Z" },
        "attack_history": { "vulnerability_probing": 20 },
        "operator": null,
        "last_updated": "2026-09-20T11:30:55Z"
    },
    "query_time": 5
}

Also includes detection confidence, first and last seen dates, device estimates, detection and attack history, and VPN operator details such as services, protocols and policies.

Code examples

# Save your IP to a variable
IP=$(curl -s checkip.me)
echo "My IP is $IP"

# Get a single field as plain text
COUNTRY=$(curl -s checkip.me/country)

# Check whether an IP is a VPN
if [ "$(curl -s checkip.me/1.2.3.4/vpn)" = "true" ]; then echo "VPN detected"; fi

# Several fields at once (needs jq)
curl -s checkip.me/1.2.3.4 | jq '{vpn, proxy, risk}'
:: Command Prompt (cmd)
curl checkip.me
curl checkip.me/json

# PowerShell: use curl.exe, or
(Invoke-RestMethod https://checkip.me/json).country
import requests

ip = requests.get("https://checkip.me").text.strip()

info = requests.get("https://checkip.me/8.8.8.8").json()
print(info["country"], info["isp"], info["vpn"])
// Works in the browser (CORS enabled) and Node.js 18+
const res = await fetch("https://checkip.me/json");
const info = await res.json();

console.log(info.ip, info.country, info.vpn);
<?php
$ip   = trim(file_get_contents('https://checkip.me/ip'));
$info = json_decode(file_get_contents('https://checkip.me/8.8.8.8'), true);

echo $info['country'] . ' - ' . $info['isp'];

Errors

A failed lookup returns an HTTP error status and a JSON body with an error field:

{
    "ip": "192.168.1.1",
    "error": "This is a private or reserved IP address. No public data is available for it."
}
StatusMeaning
200Success
404Unknown path or invalid IP address
422Private or reserved IP (e.g. 10.x, 192.168.x)
429Too many lookups. See usage limits below.
502The data source did not respond. Try again later.

Usage limits