Hacker News new | ask | show | jobs
by 0x6A75616E 1055 days ago
the issue is that these return a bunch of html so using them from the command line is not ideal.

I made wgetip.com back in 2008 to solve this. icanhaz must've been pretty suboptimal back then to have issues with traffic. wgetip still gets about 3M requests per hour. All from a single $5 droplet.

2 comments

ip4.me and ip6.me have /api endpoint for programmatic access
The /api endpoint seems to return me a 301 error from the command line.
That’s a redirect, not an error. Probably to /api/ with a trailing slash. Or use the -l flag to curl to have it auto redirect.

  curl https://ip4.me/api/
works for me
There, /ip is better.
Best thing to try first is to append /ip I've found.

For wgetip.com that is not needed of course. But I haven't found a way to get the IPv4 address there...