ZIP-to-city lookups are not reliable, because ZIP Code allocation in more and more locations now forces two different place names to share the same five-digit ZIP Code (but different ZIP + 4® codes).
Beware: The proper city name for an address should always be determined using a ZIP + 4 database, not just from the five-digit ZIP Code!
Here are examples of addresses where a simple ZIP lookup returns the wrong city name...
For this address and ZIP The PROPER city is But a ZIP file usually shows --------------------------- --------------------- ---------------------------- 678 Alexander Ct, 07675 RIVER VALE Westwood! 7801 Airport Hwy, 08109 PENNSAUKEN Merchantville! 800 N Federal Hwy, 33462 LANTANA Lake Worth! 6300 Blue Beech Rd, 48306 ROCHESTER HILLS Rochester! 904 Silver Spur Rd, 90274 ROLLING HILLS ESTATES Palos Verdes Peninsula! 73 Briarwood Ln, 91301 OAK PARK Agoura Hills! 10200 Riverside Dr, 91602 TOLUCA LAKE North Hollywood! 1235 Tournament Dr, 94010 HILLSBOROUGH Burlingame! 989 E Hillsdale Blvd, 94404 FOSTER CITY San Mateo!(These examples were collected April 1997 and might change over time.)
It is not meaningful to select or use a five-digit ZIP without having an actual address in hand. Always provide an actual address along with the city or ZIP when doing a lookup.
Programmer: When our operators type in a ZIP Code, we want to automatically display the city in our order form.
The experts say: If you submit an address and a ZIP to ZP4 (including a city is preferred but isn't required), ZP4 will send back the corrected address, city, and ZIP + 4 code.
Programmer: But we want our operators to type in the ZIP first, display the city to the operator for confirmation,
then have the operator enter the address.
The experts say: You can use GENERAL DELIVERY to look up the city given just the ZIP (or the ZIP given just the city). But without an address, a ZIP often represents multiple place names, and then it's not possible to know which name to use.
Programmer: In that case, we want our operators to type in the ZIP, display the list of place names,
and let the operator choose one.
The experts say: You've now inefficiently shifted the burden of address validation from the computer onto the operator. First, you're assuming the operator inputs the ZIP correctly. (Just about any digit error while typing a ZIP still results in some other valid ZIP, which would then display the wrong list of place names.) Second, you're assuming the operator knows which place name to choose from the list. The whole point of ZP4 is to use the fast automatic logic of the computer instead of a slow inaccurate uninformed operator.
Programmer: The operator can confirm the proper place with the caller.
The experts say: Now you've again shifted some of the burden of address validation, this time to the caller, who will often make mistakes such as confusing their work address and home address, or using "vanity" place names, and so on. Also, your caller and operator aren't going to be familiar with all the esoteric Postal Service™ rules about which place name and ZIP Code are an allowable pair.
Also be careful not to get caught in thinking your operators will save time if you can reduce their keystrokes. They'll just end up wasting more time (and making actual errors) searching for the correct address because their input was insufficient to unambiguously select a single address.
In the long run, it's much more faster and accurate to make operators type the whole address (yes: street, city and ZIP), and let the software do the job of validating everything and determining the correct final address.
Programmer: We don't want our operators to have to type the city.
The experts say: If you're processing a database with an address, and you can't bear to have your operators type a city, then pass the address and ZIP to ZP4 to automatically determinate the city. However, without a city on input, ZIP typos for common addresses like 100 MAIN ST or PO BOX 5 will often cause the wrong city to be chosen. So, you should always pass the address, city and ZIP to ZP4 to automatically crosscheck everything.
Having operators type the city is actually usually faster on average than scrolling and selecting from a list of cities (for which they won't know what the proper city selection is, anyway).
Programmer: But I've got a database with just cities and ZIP codes.
I only need to confirm 37129 is a valid ZIP for Murfreesboro.
The experts say: Watch out, 37129 is only valid for some addresses in that city. 37127 or 37128 is valid for other addresses. If you're processing a database with just cities and ZIP codes and no address, then that database is incorrectly designed because it doesn't allow proper validation, and it needs to have addresses added to it.
Programmer: I still want just a list of cities and ZIP codes.
The experts say: If you must use a simple list, in spite of the above warnings, you can export the Z5 city-state-ZIP-county database included with ZP4, or programmatically search those records. However, lookups without an address defeats the purpose of full ZP4-style address validation, and is definitely not recommended. You will probably be making wrong assumptions about which city name or ZIP Code to use.