You can use the USPS address validation APi to validate a recipient's address. The USPS's Address Validation API can be used for this purpose. This jSON-based API allows you to make automated calls to the USPS's database, validate a single address, and then aggregate the results for use by your application. The USPS addresses data is free to use, and the API is a simple way to get the data you need.
The USPS addresses API can also be used to validate the addresses of your customers. This feature helps prevent missed deliveries and address correction surcharges. You can call the address validation API to check an address and receive a new object. Several messages are returned if the API fails to find a match. There are three reasons for this. The first reason is that the address is not valid. Once you've entered the address and clicked on the "validate" button, the validation API will return a new address object.
Next, the API resolves an address. This function is used to resolve a postal address. It will identify whether an address matches known reference data. In countries without postal codes, the state code is sufficient. The API also tries to normalize input addresses. This could mean replacing common roadway identifiers and reordering the components of the address. Finally, the API will return the input to the user.