Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining company name from IP address

I apologize for the broad question. But I have a list of IP addresses, and would like to connect them to the companies they came from.

I'm not interested in identifying personal IP address information (probably not even possible) but I figure there must be a way to identify if the IP address is associated with a large corporation.

Whois.net usually only gives the ISP name, not the company name.

Thank you

like image 562
user2948687 Avatar asked Nov 02 '13 21:11

user2948687


2 Answers

The http://ipinfo.io API (my own service) returns the company name as the org field:

$ curl http://ipinfo.io/198.252.206.16
{
  "ip": "198.252.206.16",
  "hostname": "stackoverflow.com",
  "city": null,
  "region": null,
  "country": "US",
  "loc": "38.0000,-97.0000",
  "org": "AS25791 Stack Exchange, Inc."
}

You can get just that field by adding /org to the URL:

$ curl http://ipinfo.io/198.252.206.16/org
AS25791 Stack Exchange, Inc.

You can combine this with some other commands to do a bulk lookup of all of your IPs and see what company they belong to:

$ cat ips.txt | xargs -I% curl -s http://ipinfo.io/%/org | paste ips.txt -
198.252.206.16  AS25791 Stack Exchange, Inc.
173.252.110.27  AS32934 Facebook, Inc.
74.125.239.132  AS15169 Google Inc.
206.190.36.45   AS36647 Yahoo

You can find out more details about the API at http://ipinfo.io/developers.

like image 66
Ben Dowling Avatar answered Oct 24 '22 09:10

Ben Dowling


I suggest trying out Ipregistry (disclaimer: I run the service).

Ipregistry returns company data along with the company domain name when available. You also get IP type classification, many more data such as threat data that allows detecting and preventing fraud.

For a quick try, just open the next link in your browser:

https://api.ipregistry.co/198.252.206.16?key=tryout&pretty=true

like image 30
Laurent Avatar answered Oct 24 '22 07:10

Laurent