News for hackers. Stuff that matters.
Re:Show HN: zipasaur.us, a simple postal code API by misterhaywood on Saturday April 27, 2013 @12:04PM (#5618139)
Give an example with multiple word city name. For example, would http://zipasaur.us/state/il/city/east+moline or http://zipasaur.us/state/ca/city/los+angeles work?
Re:Show HN: zipasaur.us, a simple postal code API by eignerchris_ on Saturday April 27, 2013 @11:41PM (#5620102)
Good catch. I've fixed this and updated one of the examples. You should be able to do just as you described: http://zipasaur.us/state/ca/city/los+angeles
Re:Show HN: zipasaur.us, a simple postal code API by afaqurk on Saturday April 27, 2013 @02:33PM (#5618621)
Very awesome utility API. A bit targeted (US) but I will be integrating it into 2 projects immediately.
Re:Show HN: zipasaur.us, a simple postal code API by joeyespo on Tuesday May 07, 2013 @04:38PM (#5670623)
Hey Chris, this looks awesome!

I saw the donate button. Are you on Gittip? I'd be happy to set up a recurring donation if I end up using this in some of my projects.

https://www.gittip.com/

Re:Show HN: zipasaur.us, a simple postal code API by eignerchris_ on Saturday April 27, 2013 @10:56PM (#5619984)
hey thanks everyone for the feedback. GeoNames includes postal code data for many countries. I'll see if I can add more countries in the next week or so!
Re:Show HN: zipasaur.us, a simple postal code API by draz on Saturday April 27, 2013 @10:13AM (#5617798)
Related: can you expand it to include the reverse (geolocation to zip code)? Anyone know of a restful service that might do that, alternatively?
Re:Show HN: zipasaur.us, a simple postal code API by lutusp on Saturday April 27, 2013 @10:32AM (#5617854)
That would be very difficult, and couldn't be made deterministic with a typical ZIP code database. The reason is most ZIP code databases list a geological position representing a location within the zone, but not its perimeter or geological extent. Therefore, converting from a geological position to a ZIP code would be a guessing game.

Here's a typical ZIP code database entry:

"74857","Newalla","OK","35.351612","-97.19507","-6","1"

The fields are ZIP code, place name, state, latitude ("-" = south), longitude ("-" = west), time zone, location honors daylight time. So no size or shape for the zone itself, only a location within the zone.

An algorithm might find the geographically nearest ZIP code position for a given argument position and return that result, but it would likely be wrong in many situations where there are a lot of ZIP codes, like urban areas.

Re:Show HN: zipasaur.us, a simple postal code API by draz on Saturday April 27, 2013 @01:07PM (#5618320)
that's actually good enough for my purposes :-) (I'm looking to get a zip code from the browser and then show stores, for example, in a 50 mile radius). 2 adjacent zip codes would still be around 50 miles from the store.
Re:Show HN: zipasaur.us, a simple postal code API by j0k3r on Saturday April 27, 2013 @07:08AM (#5617438)
Nice, but US limited.