myip.addr.tools - get your public IP address
$ curl myip.addr.tools 2001:db8::c0:ffee
$ curl myipv4.addr.tools 192.0.2.1
$ curl myipv6.addr.tools 2001:db8::c0:ffee
$ curl myip.addr.tools/json {"ip":"2001:db8::c0:ffee"}
Returns your public IP address. That's it.
By default, your IP is returned with a trailing newline character. Change this by specifying a format:
/plain | no trailing newline |
/json | a JSON object |
/json?key=foo | a JSON object with custom key |
/pfsense | a pfSense IP Check Service |