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
| Endpoint | What |
|---|---|
| /json | Your IP + ISP, ASN, location, CGNAT hint, VPN/hosting flag |
| /ip | Your IP, plain text |
| /api/ip?q=8.8.8.8 | Look up any IP or hostname |
| /api/dns?name=example.com&type=MX | DNS records (add &mode=compare) |
| /api/blocked?domain=example.com | NTC block status |
| /api/asn?q=AS9299 | ASN overview, prefixes, neighbours |
| /api/mac?q=90:09:d0 | MAC vendor |
Fair use: rate limited per IP (HTTP 429 when exceeded). Geolocation by DB-IP (CC BY 4.0).