3

I'd like to use an API to parse US Postal addresses input into an ASP.NET application. I will store the input address, no matter how it's input, then attempt to parse and verify with the user.

Does Google, Microsoft or Yahoo have such functionality in their APIs? If so, what is your experience with the various APIs?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Feckmore
  • 4,322
  • 6
  • 43
  • 51
  • Were you asking about parsing a free-form "paragraph" (textarea) address into its fields? As far as I can tell the USPS API requires separate address, city state, zip. I'm looking to support free-form address and wasn't sure if you were asking the same thing. – Bob Stein Feb 11 '15 at 12:43
  • @BobStein-VisiBone, I honestly don't remember which problem I was tackling at the time, but I usually have access to the constituent pieces of the addresses. – Feckmore Feb 11 '15 at 14:51
  • Ah so one might say this was more about **validating** than parsing? Not to nit... – Bob Stein Feb 11 '15 at 15:05
  • Rereading my original question, it looks like I was asking about parsing... but I can't for the life of me remember what I was working on. – Feckmore Feb 11 '15 at 15:15
  • 1
    I see what you mean, "no matter how it's input". FWIW I ended up using the [smartystreets](http://stackoverflow.com/q/11160192/673991) jQuery plugin to parse and validate US addresses. – Bob Stein Feb 11 '15 at 15:33

3 Answers3

9

USPS provides its own API as long as everything is inside the US. You'll need to apply to have access to the API. Start here:

https://www.usps.com/business/webtools-address-information.htm?

Knox
  • 2,909
  • 11
  • 37
  • 65
Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
3

geonames

http://www.geonames.org/export/web-services.html#postalCodeLookupJSON

Jason
  • 2,035
  • 11
  • 13
2

I don't know how reliable these are but

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

http://codebump.com/services/zipcodelookup.asmx

Also, a lot of the google apis (maps, new) will turn zip codes into cities and other info (news, geo coordinates, etc).

Jacob Adams
  • 3,944
  • 3
  • 26
  • 42