views:

140

answers:

4

I want to be able to give a best guess for what city and state a zip code is in via a web application. Is there some web service I can use to figure this out?

+3  A: 

The USPS has an API for this, but you have to register:

USPS Web Tools

Jeff
A: 

These people seem to expose one...

http://www.webservicex.net/uszip.asmx

Jason Punyon
+3  A: 

Hate to do this to you, but look here...

I believe the USPS has an API for some queries, you should look into that.

However, here are a few from the above resource:

Adam Davis
I may be receiving an API key from the USPS within 24 hours.
MikeN
A: 

You can get a database that maps zip code to longitude/latitude, and another database that provides longitude/latitude for all US cities. Then you could just do that on your side, without having to send out to a web service.

I've seen both these databases, but I can't remember where to find them right now. I'll poke around and try to remember to add a comment.

Jay Kominek