问题
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
回答1:
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.
回答2:
ipdata.co provides an API endpoint (https://api.ipdata.co) that provides such information (I run this service)
Ipdata has 10 endpoints around the world each able to handle >800M calls daily!
curl https://api.ipdata.co/70.70.70.70?api-key=test
This answer uses a 'test' API Key that is very limited and only meant for testing a few calls. Signup for your own Free API Key and get up to 1500 requests daily for development.
Gives
{
"ip": "70.70.70.70",
"is_eu": false,
"city": "",
"region": "",
"region_code": "",
"country_name": "Canada",
"country_code": "CA",
"continent_name": "North America",
"continent_code": "NA",
"latitude": 43.6319,
"longitude": -79.3716,
"asn": "AS6327",
"organisation": "Shaw Communications Inc.",
"postal": "",
"calling_code": "1",
"flag": "https://ipdata.co/flags/ca.png",
"emoji_flag": "\ud83c\udde8\ud83c\udde6",
"emoji_unicode": "U+1F1E8 U+1F1E6",
"languages": [
{
"name": "English",
"native": "English"
},
{
"name": "French",
"native": "Fran\u00e7ais"
}
],
"currency": {
"name": "Canadian Dollar",
"code": "CAD",
"symbol": "CA$",
"native": "$",
"plural": "Canadian dollars"
},
"time_zone": {
"name": "",
"abbr": "",
"offset": "",
"is_dst": "",
"current_time": ""
},
"threat": {
"is_tor": false,
"is_proxy": false,
"is_anonymous": false,
"is_known_attacker": false,
"is_known_abuser": false,
"is_threat": false,
"is_bogon": false
},
}
回答3:
If you have the IP address you can go to who.is and enter the IP. If you then scroll down you will find a feild where it says "OrgName:" and there you got it :)
Here is a image of when I did a search on 74.125.228.72 (youtube.com owned by Google):
回答4:
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
来源:https://stackoverflow.com/questions/19747074/determining-company-name-from-ip-address