ipify provides a quick way to check public IP address of a host.
A simple curl command is all I need.
curl https://api.ipify.org
Output in JSON format.
curl https://api.ipify.org?format=json
Of course you can integrate this into your application to query IP address programatically.