3 Free Ways to Geolocate By IP

Dating websites don't have anything on you now. Convert an Internet user's current IP address (like to a city name, or even geo coordinates with these IP lookup APIs. And do it for free. Hostip.info is a community-powered database of IP mapping. Its REST API is easy to incorporate into server-side code, with several options for the type of output. Check out our hostip.info API profile, where you can see the mashups already using this API. Blogama (now IPInfoDB) is a new IP geolocation API with streamlined data based on the MaxMind API. Marc-Andre Caron reduced duplication and surprisingly has a database of only 1.2 million records that is still incredibly accurate to the city level. Even better, as Make pointed out, you can load the data into your own database for speedier access. Our IPInfoDB API profileTrack this API. MaxMind is an API of a different sort. Rather than call to a web service, its free version is distributed as a binary. There are open source libraries for common programming languages to access the IP data. Find out more in our MaxMind GeoIP API profile. Now that you can find your user's location, what can you do? For starters, how about centering your map mashup automatically on the user's city? If your site requires registration, why not help fill out that profile? How will you use this geo data? Is it cool, or a little creepy?

Be sure to read the next Mapping article: Google Earth Now Goes From the Ocean Floor to Mars in 3D


Comments (22)

[...] Marc-Andre Caron compiled a MySQL IP database that you can install on your own server. Read on for some basic instructions to roll your own geocoder. If you’d rather use a web service to get at the data, check out my post at ProgrammableWeb. [...]


The SpamID.net IP locator is also programmable and free. It doesn't use a large database, but instead locates in real time. Its main advantage over hostip.info is that it returns a lot more locations. Its main advantage over Maxmind's free product is that it is not affected by newly routable or reassigned IP addresses, which Maxmind often takes months to update. Its main disadvantage is that some queries take longer to run -- the tradeoff of not maintaining a large database that can have out of date entries at any particular moment.

[...] same place as my server, Culver City, California. That is because MaxMind, and similar services, use IP addresses to look up location. Every computer connected to the Internet has its own IP [...]

[...] is perhaps easier to use than the 3 IP geolocation methods I described in a previous post. Though, this is a JavaScript-only API, meaning it cannot be [...]


Actually their all rather uninteresting as the location given is the registered address of the IP block register assignee - typically the tier 2 or 3 internet provider. As a result the results are generally useless if you actually want to know with any degree of certainty where the user is. As an example choose some SingTel IPs in the continental US. All three GeoIP sources (which use the same source data anyway) will claim that the host is in Singapore - useless.

[...] previously covered 3 free to geolocate any user. Today there’s another option, with Quova offering its service for free for the first time. [...]

I would like to show some appreciation to the writer just for bailing me out of such a crisis. Right after surfing around through the the web and seeing thoughts that were not powerful, I was thinking my life was over. Living without the presence of answers to the problems you've fixed as a result of your main guideline is a crucial case, and ones which might have adversely affected my career if I hadn't encountered your blog post. Your training and kindness in handling a lot of stuff was precious. I am not sure what I would have done if I had not come across such a solution like this. It's possible to now look forward to my future. Thanks for your time very much for this skilled and effective guide. I won't think twice to recommend your site to anybody who should have support on this problem.

Your Biogama link leads to a mailcious site.

Today, I went to the beach front with my children.

I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She

put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.

She never wants to go back! LoL I know this is completely

off topic but I had to tell someone!

Cool, not creepy. I am required to post certain statutory notices on sales pages by the laws of the country where my business operates. If I am serving a page outside that country I do not want the statutory notice as it is just plain annoying. Geolocation of IPs is the way to go!