API and command line

Free IP lookup API: plain text, JSON, WHOIS and unlock check. curl ipk.me

Command line

curl ipk.me                 # Your IP and location
curl ipk.me/ip              # Your IP only
curl -4 ipk.me              # IPv4
curl -6 ipk.me              # IPv6
curl ipk.me/8.8.8.8         # Look up an IP
curl ipk.me/json            # JSON
curl ipk.me/json/8.8.8.8

HTTP API

GET /ipYour IP only
GET /json[/<ip>]Location, ASN, network type, ISP (indented JSON)
GET /api/ip[/<ip>]Same as /json, compact
GET /api/whois/<ip|ASN|domain>WHOIS
GET /api/unlock/<ip>Latest unlock check of the IP's network

Parameters

lang=zh-CN|en|ja|...Place-name language
ptr=0Skip reverse DNS (faster)
sources=1Include raw results from each database
$ curl ipk.me/json/223.5.5.5?lang=zh-CN
{
  "ip": "223.5.5.5",
  "country_code": "CN",
  "country": "中国",
  "region": "浙江省",
  "city": "杭州市",
  "asn": 45102,
  "as_org": "Alibaba (US) Technology Co., Ltd.",
  "as_type": "idc",
  "isp": "阿里云",
  "network": "223.5.5.0/24",
  "hostname": "public1.alidns.com"
}

Unlock check

bash <(curl -sL ipk.me/check)              # IPv4 + IPv6
bash <(curl -sL ipk.me/check) -4 | -6
bash <(curl -sL ipk.me/check) --no-share   # Don't upload results
bash <(curl -sL ipk.me/check) --lite       # Common services only, skip the full check

Netflix · Disney+ · YouTube Premium · Prime Video · TikTok · Viu · iQIYI · Bilibili · Google · ChatGPT · Claude · Gemini · HBO Max · Hulu · Dazn · Abema · Wavve · BBC iPlayer … · Unlock check →

English