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.info

wget

wget -qO- https://iptoolbox.info

PowerShell

Invoke-RestMethod https://iptoolbox.info/ip

Plain 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/ip

IPv4 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.

A LITTLE CONTEXT GOES A LONG WAY

Notes from the field.

UNDERSTAND THE ANSWER
PREFER A TERMINAL?

Just the IP. Nothing else.

curl -fsS https://iptoolbox.infoCLI & JSON docs ↗