views:

293

answers:

4

What do people use to geo-locate a persons IP to determine the city they are in?

I've tried the built in functionality of Google API but its geo-location database seem spotty.

http://code.google.com/apis/ajax/documentation/#ClientLocation

Anyone use any other service for geo-locating with success?

+3  A: 

The most stable company I've seen that does it is MaxMind.

A buddy of mine is using is with success.

Allain Lalonde
There is a free version available which is a little hard to find since it isn't accessible from the top or side navigation it seems. http://www.maxmind.com/app/geolitecity
DavGarcia
A: 

I just tried MaxMind and it geo-located myself and MaxMind states I'm nearly 200 miles from where I truly am located.

This is not an Answer to the question.
Argalatyr
this is more a reflection on how your ISP works than of the service.
Allain Lalonde
+2  A: 

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

splattne
A: 

I've used IPInfoDB (which may use the same database as MaxMind) which has straightforward XML and JSON formats to their API, along with Google's ClientLocation. Neither is perfect and they often disagree. I haven't really found one to be better than the other.

npdoty