This API validates US addresses and also return closely matched addresses. See list of match codes from this API call here -> https://snapcx.readme.io/docs/avsv1validateaddress .
This FREE API has two features. First feature is, "Given City and State (2 char state code), it will get all zipcodes for it". And second feature is "Given zipcode, then it will get city & state for it". It also provides other details like type of zipcode (PO Box or standard or unique). It provides latitude & longitude of zipcode center.