This kind of service is exactly what STUN servers are made for. Designed to be used with webrtc, but it works perfectly alright by itself.
There are a plethora of unauthenticated STUN servers around, and while there's still room for abuse, the protocol is a bit more lightweight than full-blown http requests, and faster, too!
I've dabbled with doing this on my own, but I've found `myip` to do the job nicely and without hassle:
replies(1):