There is a community-based Geotargeting service from hostip.info. They have a nice clean API for Geotargeted IP Address Lookup. They've got over 8.6 million entries in their database.
Example:
http://api.hostip.info/get_html.php?ip=12.215.42.19&position=true
Country: UNITED STATES (US)
City: Sugar Grove, IL
Latitude: 41.7696
Longitude: -88.4588
if you add just call:
http://api.hostip.info/?ip=12.215.42.19
You'll get an XML document back.
Source: Scott Hanselman - The Weekly Source Code 37 - Geolocation/Geotargeting (Reverse IP Address Lookup) in ASP.NET MVC made easy