Entering Zip Code completes Address

Not sure in which forum to ask this question?

I see a lot of larger ecommerce sites where they just ask you for your zipcode, and automagically they populate your city and state.

How does this work?

And how hard would it be to apply on my tiny website?

Thanks.

just have a research for AJAX / autosuggest / JQuery autocomplete

You could use a public API like Ziptastic or USPS Web Tools to do the actual lookup.

So the way that works is that I rely on some 3rd party service, huh? (I didn’t know if I had to create a lookup table locally or what?)

Can I use the USPS’s service for free, or does it cost money?

And how reliable is using the USPS’s service? (I had a friend that if you just typed in his zip code would always bring up the wrong city because while he lived in City-A, the mail went to adjacent City-B so his zip code briugh up not City-A where he physically lived, but City-B where the mail would be shipped to. Confusing!!)

You can certainly create your own local lookup table if you can get the data in an importable format somewhere.

The USPS website says the service is free if you create an account. I’ve never used the USPS service so I can’t really speak to it’s reliability, but considering that the USPS is pretty much the original source I would guess it would be as good as you are going to get.

Do you think using address completion via zip code is worth it?

Like I said, I can think of one person I know where that would break his address every time.

It is supposed to make form completion easier, but there are downsides to.

I wouldn’t give too much weight to your friend’s experience. That’s just one data-point. It could just be that his address is an exception and that things will work just fine for the majority of your users. You could run test with a bunch of known addresses to check if you are happy with the results.
Anyway, as long as you keep your City and State fields on your forms editable so that your users can manually correct them, then it’s not a big deal if the lookup gets it wrong in rare cases.

Do you think using address completion via zip code is worth it?

I can’t really answer that question. In theory any change that makes the experience for you users smoother and requires them to enter less information will give better results. Whether you will see a good enough improvement in sales numbers on your site in practice is difficult to say.

Q: How Accurate is a Zip-Based match?
A: Depends entirely upon the ZIP in question. For some ZIP codes, it will be completely accurate - mostly in urban, metropolitan areas. For some ZIP codes, it will be almost completely inaccurate - there is a zip code in Nevada (89049) that is bigger than the state of Maryland. There are also ZIP codes - 13 of them, in fact - that span across a state boundary; so you can’t even guarantee to be in the right state.

ZIP codes (or more accurately, ZIP Code Tabulation Areas) are not defined by some geopolitical feature, but are the areas served by a given distribution node of the USPS.

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.