Map Scripting


Create Location-based Web Applications

Roll Your Own Postal Code Database

Many apps use zip codes to determine a user’s location. You can get the results with a geocoder service, or you can roll your own. From the same folks that supply the IP geolocation database, you can download one for U.S. zip codes.

The download is available as a direct database dump or CSV, like this:


You’ll need to load it into a database and perform lookups yourself (ie, “select latitude, longitude from zips where zipcode=?”), but this is a good way to avoid wasting precious calls on fairly static and finite data.

Zip codes do change from time to time, so the database is updated periodically.

Looking for non-US postal codes? Check these out:

Category: How-tos


51 Responses

  1. leo says:

    alternated@inferno.eli” rel=”nofollow”>.…


Leave a Reply

Adam DuVanderHi, I'm Adam. I'm writing a book about developing maps on the web. This site is where I'll share the things I find and help you create your own maps. Find out more.

Map Scripting 101