Rule-based US address validation for form and negative testing: USPS-style standardisation, ZIP format and ZIP-to-state area checks, a sample ZIP lookup and per-field 422 errors.
Base URL: https://funapi.dev/api/address/v1 · 3 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
validate and standardise
POST /address/v1/validate — Validate and standardise a US address (USPS-style abbreviations, ZIP/state check) · Responds with 200 422 Link to this endpointZIPs and states
GET /address/v1/zip/{zip} — City and state for a ZIP code in the sample set · Responds with 200 400 404 Link to this endpointGET /address/v1/states — The 50 states and DC with their codes · Responds with 200 Link to this endpointThe US Address Validation API checks addresses the way a checkout form needs: it standardises the street line with USPS-style abbreviations, normalises city, state and ZIP+4, flags a ZIP whose USPS area does not contain the state, and returns per-field 422 errors for missing or malformed input. It is rule-based practice validation, not a USPS service, which keeps it deterministic and free.
GET https://funapi.dev/api/address/v1/states — The 50 states and DC with their codes. No token, no signup:
curl -i https://funapi.dev/api/address/v1/states
Response: 200 OK
{
"data": [
{
"code": "AL",
"name": "Alabama"
},
{
"code": "AK",
"name": "Alaska"
},
{
"code": "AZ",
"name": "Arizona"
},
{
"code": "AR",
"name": "Arkansas"
},
{
"code": "CA",
"name": "California"
},
{
"code": "CO",
"name": "Colorado"
},
{
"code": "CT",
"name": "Connecticut"
},
{
"code": "DE",
"name": "Delaware"
},
{
"code": "DC",
"name": "District of Columbia"
},
{
"code": "FL",
"name": "Florida"
},
{
"code": "GA",
"name": "Georgia"
},
{
"code": "HI",
"name": "Hawaii"
},
{
"code": "ID",
"name": "Idaho"
},
{
"code": "IL",
"name": "Illinois"
},
{
"code": "IN",
"name": "Indiana"
},
{
"code": "IA",
"name": "Iowa"
},
{
"code": "KS",
"name": "Kansas"
},
{
"code": "KY",
"name": "Kentucky"
},
{
"code": "LA",
(truncated — the full response comes back when you run it)
Last updated