Web Services

Zip Code Lookup Service

Inspired by the purchase of my Garmin iQue 3600, a PDA with built-in GPS, I decided to implement a service that would take a longitude and latitude and return the zip code those coordinates were contained in. Note that this will only work in the USA, and it will only return 5 digit zip codes. The original data is from the US Census, but the data I'm using came from Kevin Roth's website, since he took the time to make it into a MySQL database, and provide a nice SQL query for finding the closest zip code to a given latitude/longitude.

The WSDL file for the web service can be found here: ZipCodeLookup.wsdl.xml.

A web form version of the lookup can be found here if you'd like to try it out without implementing a client.

The service is implemented in Perl, using SOAP::Lite, which made development ridiculously easy. All the data is stored in a MySQL database.