Hacker News new | ask | show | jobs
by zokier 1055 days ago
ip4.me and ip6.me have /api endpoint for programmatic access
2 comments

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.