If you really don't want to rely on third-party APIs, you can get an IP address via DNS. It's not technically a web request, so I guess that counts.
It works by bypassing your local DNS resolver and querying external DNS servers directly: this way you can get your public IP address in a record.
Here's a demo. It's a bit verbose, but you'll get the idea.