Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good API to find the latitude and longitude of a zip code? [closed]

Anyone know of a good free API to get the coordinates of a zip code? What I am currently using is

http://forecast.weather.gov/zipcity.php?inputstring=00000

But this is not a real API and is subject to change. I do not need exact locations, the purpose of this information is to find sunrise / sunset times.

like image 964
msbg Avatar asked Sep 09 '12 01:09

msbg


2 Answers

Since I just needed to geocode a bunch of addresses and store it in the DB, I could not use the Google API as it'd be a TOS violation. Also I was looking for batch processing if possible. My search lead me to 2 APIs.

The first API was from MapQuest. It was easy enough to sign up for a key and start using the service. The problem with the free version is, sometimes, you get back blank co-ordinates for addresses. Apparently the enterprise version does not have this issue. Alas, I had to can this as it does not suit my needs.

The second gem I stumbled upon is from the United States Census Bureau. It provides REST interface for API access and there is no need for an API key. So far in my tests, I've had a match returned for all my queries. My only concern here is I see no verbiage about usage limits etc. Here is a link to the documentation: http://geocoding.geo.census.gov/geocoder/Geocoding_Services_API.pdf

like image 151
Karthic Raghupathi Avatar answered Sep 20 '22 00:09

Karthic Raghupathi


I think you should take a look at the Google API.

like image 45
EvilTeach Avatar answered Sep 19 '22 00:09

EvilTeach