I'm currently building a B2B web application. As a part of the signup process, I require users to enter their office's street address, state, and city, which I then geocode into latitude and longitude using the Bing Maps API. Since I'm primarily using their address for geocoding purposes, I haven't had any issues so far, but now I'm wondering if I should collect their zip code "just in case".

The only scenario I can think where a zip code would affect geolocation is if two places have the exact same address, city, and state but different zip codes. Is that scenario even possible?

Would it be a good idea to collect zip codes, even though I already have enough information to accurately and reliably geocode their coordinates?

  • 2
    Will you ever have the need to use postal service? Post Service will likely have required zip codes for business senders.
    – rwong
    Commented Sep 27, 2014 at 21:46
  • @rwong Thanks for the response. I don't foresee the need to physically mail them anything. All communications currently take place over email.
    – fbonetti
    Commented Sep 27, 2014 at 21:56
  • 7
    So you want to collect addresses – you might want to read Falsehoods Programmers Believe About Addresses, e.g. the sections “You can't have two towns with the same name in the same country”, “An address will have a postcode”, and “An address corresponds to the recipient's location”. If you need their location, it might actually be easier (and more fun!) to let customers pick their location on a map (and maybe figure out the address based on location).
    – amon
    Commented Sep 27, 2014 at 22:12
  • 1
    Is it "County Highway KP", "Highway KP", "County Road KP", or "Rural Route 1"? Note that the post office accepts all of those. People under 30 tend to use "Highway KP", while those over 60 still have some holdouts for "Rural Route 1" - there are some in the 30 to 60 crowd that use "County Trunk Highway KP" or "CTH KP"... Some places seem to have difficulty with such addresses, though if they looked at the zip code, they'd know. Example: stores.uscolist.com/hinkle-tv-store-1449160.html (even with the zip code, city, and state... it got the wrong city and state on google).
    – user40980
    Commented Sep 28, 2014 at 2:08
  • 1
    A minimum criteria of verifying any contact information is this: send something (information) to that destination, and have that entity reply back with that information. This is applicable to emails, mailing addresses, telephone and fax numbers, etc. If you do not perform this minimal validation, fraudsters will soon begin targeting your B2B service. The other alternative is to hire local "verifiers" to visit the place and confirm the information.
    – rwong
    Commented Sep 28, 2014 at 5:18

4 Answers 4


Yes, you should collect the zip code. Mostly because there are cases where the post office and locals disagree on city names, and geocoders get confused. Adding a zip code will massively improve your odds of success

But there is also a case I heard of in the Boston area with 2 addresses with the same city, street, and street number..but different zip codes. It sucks having a website that can't handle your address. And people in that position tend to get more frustrated over time, rather than less.


To add to btilly's answer, yes you should require a ZIP code. Not only can this help validate the address, you also assume a US style ZIP code. Other countries use different postal code systems. The UK, for example, has a much finer grained postcode system, making it a much better validator and harder to infer from an address (although there are existing services that do both).


Yes you would want to collect this if nothing more than for a sanity check.

Addresses are frequently entered incorrectly. A geocoding engine often cannot necessarily tell you this. Take 100 main street denver co and 100 main street denver pa for example. A good thing to check is to ensure the address in fact does lie within that city and zip code. If the zip code does not match the city and state, then likely one of the 3 fields are wrong and you could prompt the user at that time to check for address errors.

You might also want to have the zip code if you are planning on using something like a cass verification service to ensure the address is valid in the US.


Like the other respondents I would collect zip codes, for all the reasons stated. In addition, it is possible for geocoding to give incorrect information. I have not dealt with Bing, but I do know that Google (and some GPS systems) can give incorrect information when dealing with addresses. I have never got to the bottom of the incompatibility, but the post code and the actual location do not match for my address when using these services, and I am forever having to give couriers and others seeking my address false information to guide them to my actual location.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.