Show HN: USPS-zip-codes – solution to the ZIP code and city/state lookup problem (github.com)

4 points by pseudosavant ↗ HN
Ever found yourself repetitively filling in your city, state, and ZIP code on various forms, thinking, "There must be a simpler way?" I did. The major issue always seemed to be the lack of a reliably good public ZIP cod e + city/state dataset for this purpose. Some of the options included:

* 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

0 comments

[ 2.1 ms ] story [ 8.8 ms ] thread

No comments yet.