Collect raw address input and run it through an address validation service (e.g., USPS Address Validation API, Google Address Validation API, or a third-party service); submit the street, city, state, and postal code as separate structured fields.
Parse the validation response: accept the standardized/corrected address returned by the service (corrected street abbreviations, ZIP+4, canonical city name) rather than the raw user input.
If the service returns multiple candidate addresses or a low-confidence score, surface the candidates to a human for selection rather than guessing.
Check that the validated address is within the merchant's shipping zones before adding items to cart; some merchants surface this only at checkout, causing wasted steps.
Normalize the address to a canonical format (uppercase, abbreviated directionals, standard state codes) before storing it in your agent's address book.
For international orders, validate the country code against ISO 3166-1 alpha-2, ensure the postal code format matches the country's pattern, and check that the merchant ships internationally to that country.
Known gotchas
Address validation APIs have their own rate limits and costs; cache validated addresses with a reasonable TTL rather than re-validating on every order.
A validated address is not a guaranteed deliverable address; validation services confirm format and existence, not that a carrier can physically deliver there (e.g., PO Box restrictions, rural routes).
Apartment/unit numbers are frequently absent from address databases and cause validation to return a low-confidence result even for legitimate addresses; accept user-supplied unit numbers without requiring database confirmation.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp