Detect ISP (or/and country) by IP Address

You can use my service, the http://ipinfo.io API. Here's an example of the details it provides:

$ curl ipinfo.io
{
  "ip": "67.188.232.131",
  "hostname": "c-67-188-232-131.hsd1.ca.comcast.net",
  "city": "Milpitas",
  "region": "California",
  "country": "US",
  "loc": "37.44040000000001,-121.87049999999999",
  "org": "AS7922 Comcast Cable Communications, Inc.",
  "postal": "95035",
  "phone": 408
}

See http://ipinfo.io/developers for more information.


Maxmind's GeoLite Legacy Downloadable Databases contain ASN for IPv4 and IPv6 at:

http://dev.maxmind.com/geoip/legacy/geolite/

Both binary and CSV data formats are available to download for free. A CSV entry may look like this:

2383101952,2383116287,"AS20001 Time Warner Cable Internet LLC"

The first two fields are IP address range in decimal. The last field contains the ASN and the entity name.

Alternatively, Internet-Wide Scan Data Repository (which recently launched Censys with free online search and API) includes a regular DNS lookup for all IPv4 PTR records at:

https://scans.io/study/sonar.rdns

The freely downloadable CSV file contains entries such as:

99.99.99.90,adsl-99-99-99-90.dsl.lsan03.sbcglobal.net

The first field is the IP and the second field is the host name which you may be able to use to infer ISP.


use this http://ip-api.com/json/[ip address] example: http://ip-api.com/json/113.14.168.85

output:

{"as":"AS4134 Chinanet","city":"Nanning","country":"China","countryCode":"CN","isp":"China Telecom","lat":22.8167,"lon":108.3167,"org":"China Telecom","query":"113.14.168.85","region":"45","regionName":"Guangxi Zhuangzu Zizhiqu","status":"success","timezone":"Asia/Shanghai","zip":""}

Check out the GeoIP database by Maxmind. It's free and I've been using it in many of my java applications.

see http://dev.maxmind.com/geoip/geoip2/geolite2/

Tags:

Ip