$ curl ipinfo.io/8.8.8.8
{
"ip": "8.8.8.8",
"hostname": "google-public-dns-a.google.com",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0840",
"org": "AS15169 Google Inc.",
"postal": "94035",
"phone": "650"
}
$ curl ipinfo.io/8.8.8.8/org
AS15169 Google Inc.
And ASN details are available on the web, eg https://ipinfo.io/AS15169