Skip to content
Get started

Lookup Zip Code From City Or State

POST/v1/addver/zip_codes

Looks up all ZIP codes that correspond to a given US city and state.

  • Currently only supported for US addresses (countryCode: "US").
  • Uses 1 lookup.
Body ParametersJSONExpand Collapse
city: string

The city name.

countryCode: string

The country code. Currently only US is supported.

state: string

The state abbreviation (e.g. NY).

ReturnsExpand Collapse
data: object { zipCodes }
zipCodes: array of string
message: string
status: "success" or "error"
One of the following:
"success"
"error"

Lookup Zip Code From City Or State

curl https://api.postgrid.com/v1/addver/zip_codes \
    -H 'Content-Type: application/json' \
    -H "X-API-Key: $POSTGRID_ADDRESS_VERIFICATION_API_KEY" \
    -d '{
          "city": "city",
          "countryCode": "countryCode",
          "state": "state"
        }'
{
  "data": {
    "zipCodes": [
      "string"
    ]
  },
  "message": "message",
  "status": "success"
}
Returns Examples
{
  "data": {
    "zipCodes": [
      "string"
    ]
  },
  "message": "message",
  "status": "success"
}