* Tapping into the USPS's free API, which required writing specific code.
* Purchasing the data in a more accessible format from resellers.
* Risking the data's accuracy by downloading a random CSV file from the web.
To address these challenges, I decided to create the usps-zip-codes project with the following features:
1. Easy Data Download: You can get a fresh copy of the ZIP + city/state data using your own (free) USPS API key, no coding skills or time required.
2. Hotlinkable Snapshot: The repo contains a snapshot of the data, ideal for hotlinking.
3. Usage Examples: To make integration easier, I’ve provided examples for using the snapshot data.
4. (New) Free Public API: Thanks to Deno Deploy, I've introduced a freely available API, that supports CORS, for ZIP code to city/state lookups. Example: https://usps-zip-codes.deno.dev/90210
GitHub Repo: https://github.com/pseudosavant/usps-zip-codes
If you’re dealing with user address collection in any capacity, do your users (and yourself) a favor: Incorporate this into your forms and simplify city/state input using just the ZIP.
edit: added an example