$ ipinfo
Look up an IP address or hostname: geolocation, ASN, BGP prefix, reverse DNS and registration data. Geolocation is approximate (city-level at best).
From a terminal: curl -s "https://ipinfo.9w7.net/?q=8.8.8.8" (YAML by default; add &format=json for JSON)