A fork of @rdegges' ipify with IPv6 support, hosted on Google App Engine
Accessible via http://api.ipify.io
and https://api.ipify.io
Feel free to use and abuse.
$ curl 'http://api.ipify.io'
2001:0db8:85a3:0000:0000:8a2e:0370:7334
$ curl 'https://api.ipify.io'
2001:0db8:85a3:0000:0000:8a2e:0370:7334
$ curl 'https://v4.ipify.io'
172.16.0.99
$ curl 'https://v4.ipify.io/?format=json'
{"ip":"172.16.0.99"}
$ curl 'https://v4.ipify.io/?format=jsonp'
callback({"ip":"172.16.0.99"});
$ curl 'https://v4.ipify.io/?format=jsonp&callback=asdf'
asdf({"ip":"172.16.0.99"});
$ curl -v -H'Origin: www.example.com' 'https://v4.ipify.io/?format=jsonp&callback=asdf' 2>&1 |egrep -i 'origin'
> Origin: www.example.com
< vary: Origin
< access-control-allow-origin: www.example.com