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/?format=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:
format=plain | no trailing newline |
format=json | a JSON object |
format=json&key=foo | a JSON object with custom key |
format=pfsense | a pfSense IP Check Service |