myip.ph › Utilities

Free IP API

No key, no signup. Please keep it under ~1 request per second per client.

Plain text

curl myip.ph
curl -4 myip.ph      # force IPv4
curl -6 myip.ph      # force IPv6
wget -qO- myip.ph
http myip.ph         # HTTPie
(Invoke-WebRequest myip.ph/ip).Content   # PowerShell

Returns just your IP and a newline. https://myip.ph/ip always returns plain text, whatever the client.

JSON

curl https://myip.ph/json
{ … }

Browser (CORS enabled)

const r = await fetch('https://myip.ph/json');
const { ip, isp, asn, city, country_code } = await r.json();

Other endpoints

EndpointWhat
/jsonYour IP + ISP, ASN, location, CGNAT hint, VPN/hosting flag
/ipYour IP, plain text
/api/ip?q=8.8.8.8Look up any IP or hostname
/api/dns?name=example.com&type=MXDNS records (add &mode=compare)
/api/blocked?domain=example.comNTC block status
/api/asn?q=AS9299ASN overview, prefixes, neighbours
/api/mac?q=90:09:d0MAC vendor

Fair use: rate limited per IP (HTTP 429 when exceeded). Geolocation by DB-IP (CC BY 4.0).

Related tools