My bad luck I couldn’t find one. So, I myself made that API (using iplocation database), Hope it will help you as well.
The original source is also providing the same service in JSON. So I am shutting down my API and would request you to use the API provided by the IPLocationTools.com
IPlocationTools.com is now IP2Location.com, and they doesn’t provide APIs anymore. As the API provided by me were based on the IPLocationTools.com hence we have also stopped those APIs.
You can see http://www.ip2location.com/developers.aspx to see what are available options.
Moreover you can also see the free stable options available by Google at:
- With Google Gears : http://code.google.com/apis/gears/api_geolocation.html (it provides very accurate results, but requires Gears to be installed on client computer)