I'd like to validate the zip codes users enter when they fill out our contact form. So really I just want an API to legitimately use the USPS zip lookup from inside my script. It would take a zip code and return the city-state pair. I registered at USPS to ask about this service:
Address Information APIs
(which, by the way, is hard to find on the USPS web site). I've had no response in several business days, have no idea what is costs, etc. Anybody have experience with this mysterious API?

Searching here also turned up these ideas:

  1. Buy the data for $5 from http://www.teamredline.com/zc/
    It's updated monthly, which I suppose means another $5. But buying and transferring the data periodically is probably a blocker on this.

  2. The Flattext script http://www.zipcodelocators.com/ for $60.
    I don't know how often the data is updated.

Both of those are overkill because they use latitude, longitude.

Is there an decent inexpensive commercial API that just looks up the zip code and returns a city/state pair? ...It would act like http://zip4.usps.com/zip4/citytown.jsp and not violate USPS's terms by using that form! I assume USPS does not allow that?

    Thanks, I don't think they have an online API. That's what I'm talking about... if I can explain it right!

      5 years later
      Write a Reply...