Snipget.ai

Clean and standardize a mailing address

Heuristic
addresses_standardize

Best-effort — fuzzy, approximate, or inferred; check the confidence score.

Standardize a US address (CASS-style, NOT CASS-certified). Applies USPS Publication 28 abbreviations across the entire line_1 (directionals like NORTH → N, street suffixes like STREET → ST), extracts secondary unit labels (APT, STE, FL, UNIT — APT and STE are preserved as distinct labels), parses components (house number, pre-directional, street, suffix, post-directional), and produces a deterministic dedup key. Handles PO Box, Drawer, BIN, Rural Route, and military (APO/FPO/DPO) addresses. US ONLY: a postal_code that isn't a ZIP (5 digits) or ZIP+4 is rejected as an is_valid:false verdict with why_invalid — international addresses are out of scope, never silently mangled. IMPORTANT: this is a format normalizer, not an address validator. For certified USPS validation use Smarty alongside Snipget. Processing multiple inputs? Use `addresses_standardize_batch` to do up to 1000 in one call.

Parameters

line_1stringoptional

Primary address line.

line_2stringoptional

Secondary address line (unit, etc.).

postal_codestringoptional

ZIP code (5-digit, 9-digit, or ZIP+4).

Call it

curl -X POST https://api.snipget.ai/v1/addresses/standardize \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"line_1":"123 Main Street","line_2":"Suite 200","postal_code":"12345-6789"}'

The Batch tab sends up to 1000 inputs in one call via /v1/addresses/standardize/batch.

Example response

{
  "is_valid": true,
  "line_1": "123 MAIN ST",
  "line_2": "STE 200",
  "postal_code": "12345",
  "postal_code_plus_4": "6789",
  "dedup_key": "123 MAIN ST|STE 200|12345|6789",
  "components": {
    "address_number": "123",
    "predirectional": "",
    "street_name": "MAIN",
    "street_suffix": "ST",
    "postdirectional": ""
  },
  "type": "standard"
}

FAQ

Why use this instead of cleaning addresses myself?

It applies the official USPS abbreviations the same way every time, so "Street" becomes "ST", "Suite" becomes "STE", and a ZIP+4 gets split cleanly. It also builds a dedup_key, a single normalized string you can use to spot when two differently-typed addresses are actually the same place.

Does this verify that the address is real and deliverable?

No. This is CASS-style formatting, not USPS-CASS certified validation. It standardizes the format for cleanup and deduplication, but it does not confirm the address exists or that mail will arrive. If you need certified verification, pair it with a USPS-certified service.

How accurate is the result, and what is the matchType?

It is heuristic, a best-effort normalizer based on US postal rules and pattern matching. It handles the common cases well (street suffixes, suites, PO boxes, rural routes, military) but unusual or malformed lines may not parse perfectly, so check the confidence score on the result.

What kinds of addresses does it recognize?

Standard street addresses plus special types it tags in the "type" field: po_box, drawer, bin, rural_route, and military (APO/FPO/DPO). It is built for US addresses only: a postal code that is not a ZIP or ZIP+4 (for example a Canadian K1A 0B1) is rejected as is_valid false with a why_invalid reason rather than silently mangled.

What happens if I send a blank or junk address?

You get a normal response with confidence 0, is_valid false, and a why_invalid reason, not an error. The "type" comes back as null and the fields are empty, so you can branch on is_valid rather than handling a failure.

Related tools