BUILT FOR A TERMINAL, TOO
Small command. Useful answer.
Command-line requests to the home page return your connection IP and one newline.
curl
curl -fsS https://iptoolbox.infowget
wget -qO- https://iptoolbox.infoPowerShell
Invoke-RestMethod https://iptoolbox.info/ipPlain text, regardless of user agent
/ip always returns plain text. /api/ip returns JSON with ip and version. Neither requires a key.
curl -fsS https://iptoolbox.info/api/ipIPv4 or IPv6
Use curl -4 or curl -6 when your connection supports the corresponding protocol. A VPN or NAT changes the address this service sees. It is not necessarily your device's private address.
Be a considerate caller
Do not poll in a tight loop. Cache results where practical and wait when you receive HTTP 429. Free endpoints have request limits and no availability guarantee. The same IP-only behavior is available on our companion AboutIP.org.