Free IP address API
Fetch your public IP address from scripts, servers and the command line. Free, no API key, CORS enabled. Rate limits apply per IP: 60 requests per minute across the API, 20 per minute for /api/json and /api/dns. Going over returns HTTP 429 with a Retry-After header; sustained abuse is blocked for an hour. Responses include X-RateLimit-Limit and X-RateLimit-Remaining.
API keys for higher limits
Keys are optional. A key is judged on its own limits instead of your IP's, with a multiple of every limit below (for example 10x). Send it in a header; do not put it in URLs.
curl -H "X-API-Key: iph_yourkey" https://iphere.org/api/json?ip=8.8.8.8 curl -H "Authorization: Bearer iph_yourkey" https://iphere.org/api/dns?name=example.com
An unknown or revoked key returns HTTP 401. Need a key for a project? Contact Matrix Anchor.
Plain text
curl https://iphere.org/ip
JSON
curl https://iphere.org/api/ip
{ "ip": "203.0.113.7", "version": "IPv4" }
JSON with location and ISP
curl https://iphere.org/api/json curl "https://iphere.org/api/json?ip=8.8.8.8"
Add ?ip= to look up any public IPv4 or IPv6 address instead of your own. Private and reserved addresses return "private": true. If location lookups are at capacity you get HTTP 503 with a Retry-After header.
Returns country, region, city, latitude, longitude, asn, isp and timezone in addition to the IP, plus vpn_detected (boolean) and network_type (none, vpn, hosting or tor). VPN detection is a best-effort estimate.
Force IPv4 or IPv6 (example)
curl -4 https://iphere.org/ip curl -6 https://iphere.org/ip
WHOIS / RDAP API
curl "https://iphere.org/api/whois?q=example.com" curl "https://iphere.org/api/whois?q=8.8.8.8"
Returns the registrar, dates, status and name servers for a domain, or the network owner for an IP. Limited to 10 lookups per minute and 100 per hour per IP. Try it in the WHOIS lookup.
DNS lookup API
curl "https://iphere.org/api/dns?name=example.com&type=MX"
Queries Cloudflare, Google and NextDNS in parallel. Types: A, AAAA, CNAME, MX, NS, TXT, SOA, CAA. Limited to 20 lookups per minute and 200 per hour per IP. Try it in the DNS checker.
An Matrix Anchor free tool.