← Back to Docs

Recipe: Address normalizer

Normalize street addresses into a canonical form for deduplication and matching across datasets.

Overview

The address normalizer transforms raw address strings into a consistent format. It handles abbreviations, casing, whitespace, and common variations so that “123 Main St.” and “123 Main Street” resolve to the same canonical representation.

Input

{
  "address": "123 Main St., Apt 4B"
}

Output

{
  "normalized": "123 MAIN STREET APT 4B",
  "components": {
    "number": "123",
    "street": "MAIN",
    "suffix": "STREET",
    "unit": "APT 4B"
  }
}

Pipeline steps

  1. Trim leading and trailing whitespace.
  2. Convert to uppercase.
  3. Expand common abbreviations (ST → STREET, AVE → AVENUE).
  4. Collapse multiple spaces into a single space.
  5. Parse into structured components.

Usage

POST /api/recipes/address-normalizer
Content-Type: application/json

{
  "address": "456 Elm Ave."
}