myip123

API

No sign-up, CORS enabled. Call it from the command line, scripts or web pages.

EndpointReturns
GET /Plain-text IP for command-line tools, the web page for browsers
GET /ipYour IP address (plain text)
GET /jsonEverything (JSON)
GET /{field}One field (plain text): country, country-name, city, region, postal, timezone, asn, isp, loc, colo, ua
GET /api/dns?name=&type=&resolver=DNS lookup (JSON); resolver: cloudflare, google, alidns or all
GET /api/lookup?q=IP or domain lookup (JSON)
GET /api/whois?q=Domain registration data (JSON)
GET /api/headersRequest headers (JSON)

Examples

curl myip123.com
curl -4 myip123.com
curl -6 myip123.com
curl myip123.com/json
curl myip123.com/country
curl "myip123.com/api/dns?name=github.com&type=MX"
curl "myip123.com/api/lookup?q=8.8.8.8"
Invoke-RestMethod myip123.com
fetch('https://myip123.com/json').then(r => r.json())

Please use it fairly. Lookup endpoints may be rate limited to prevent abuse.