There are plenty of services over the Internet where we can find out the external IP address of our machine, but also such services usually provide information about Internet provider or country (or both).
So my question is: how can I obtain such information programmatically knowing the IP Address? Are there some public catalogs or some API's for retrieving such kind of 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.
Technology is progressing. After reviewing your question 6 years later, IP2Location is providing country, region or state, city, latitude and longitude, ZIP code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, usage type, proxy detection and types from IP address.
Try the ipdata.co API. It provides a lot more data on the IP address and is also extremely scalable. i.e. it has 10 global endpoints each of which can handle >800M calls a day!
Example;
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/
You can use my service, the http://ipinfo.io API. Here's an example of the details it provides:
See http://ipinfo.io/developers for more information.
use this http://ip-api.com/json/[ip address] example: http://ip-api.com/json/113.14.168.85
output: