
Free US ZIP Code Database as CSV - iamelgringo
http://coolthingoftheday.blogspot.com/2008/04/free-us-zip-code-database-as-csv.html
======
technoguyrob
I have a better and more recent one, courtesy of yours truly (don't spread it
around):

<http://therobert.org/stuff/misc/5-digit%20Commercial.csv>

7.7MB | February 2008

I need a database that shows the population in each zip code, too. If any good
Samaritan can share, that would be great.

~~~
dsplaisted
> don't spread it around Why not? Is it not public domain, or are you worried
> about the load on your server, or what?

~~~
technoguyrob
The latter. You're free to upload it elsewhere and spread it, however.

------
ConradHex
The google maps API also has pretty good geocoding, for free. You can give it
a location, and it will tell you not just lat/lng, but also how specific that
location is. (Is it a zip code? A city name? An intersection? A precise
address?)

------
rbitar
Does anyone know a good resource for searching within an X mile radius given a
zipcode?

~~~
technoguyrob
Download the database I posted in my other comment here, and try this SQL
statement:

    
    
       SELECT z.ZIPcode, (sqrt((z.latitude-z2.latitude)*(z.latitude-z2.latitude)+(z.longtitude-z2.longtitude)*(z.longtitude-z2.longtitude)))) AS dist
       FROM `zip` AS `z`, `zip` AS `z2`
       WHERE `z2`.`ZIPcode = 'YOURZIPCODE'
       ORDER BY dist LIMIT 10
    

Might be faster if you do a query to get the lat and long for the ZIP code you
need first, though. Hell, it would probably be fastest to skip the database
all together and just import the data and loop the distance formula, recording
the smallest distances as you go.

