Address Validator API

Validates US addresses using the Google Address Validation API with USPS CASS data.

Endpoint

POST /validate-address

Request Body

{
  "addressLines": ["1600 Amphitheatre Parkway, Mountain View, CA 94043"],  // required
  "regionCode": "US",         // optional, default: "US"
  "enableUspsCass": true      // optional, default: true
}

Example (curl)

curl -X POST https://vamsisnikky-address-validator.hf.space/validate-address \
  -H "Content-Type: application/json" \
  -d '{"addressLines": ["1600 Amphitheatre Parkway, Mountain View, CA 94043"]}'

Response

{
  "final_result": "Passed" | "Failed",
  "failed_reason": null | "reason string",
  "validation_details": { ... },
  "google_response": { ... }
}