I love using ipinfo.com for the extra details it provides like hostname, ISP, ASN, etc.
$ curl ipinfo.io/json
or you can look up these details for any other IP: $ curl ipinfo.io/18.18.18.18