# Address standardization API for matching and clean fields

Source: https://parseaddr.com/address-standardization-api

parseaddr has two address calls. `POST /v1/parse` splits a free-text address into house number, road, unit, city, postcode and country. `POST /v1/expand` rewrites it in normalised spellings: lower case, no punctuation, "St" to "saint", "Rd" to "road", "Str." to "strasse". Two ways of writing one address then share a match key.

## Two spellings, one key

What `/v1/expand` returns:

| Input | First variant |
| --- | --- |
| `14 St Mary's Road, Manchester M14 6BL` | `14 saint marys road manchester m14 6bl` |
| `14 Saint Marys Rd, Manchester, M14 6BL` | `14 saint marys road manchester m14 6bl` |
| `Hauptstr. 5, 10115 Berlin` | `hauptstrasse 5 10115 berlin` |
| `Hauptstraße 5, 10115 Berlin` | `hauptstrasse 5 10115 berlin` |

The Manchester address returns 16 variants, from `14 saint marys road manchester m14 6bl` to `14 street marys road manchester m 14 6 block`. Two addresses match when their lists share an entry.

```
curl -s https://api.parseaddr.com/v1/expand \
  -H "Authorization: Bearer $PARSEADDR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address": "14 Saint Marys Rd, Manchester, M14 6BL"}'
```

## Fields from /v1/parse

```
{"house_number": "14", "road": "st mary's road", "city": "manchester", "postcode": "m14 6bl"}
```

That is the `parsed` object for `14 St Mary's Road, Manchester M14 6BL`. `/v1/parse` keeps the input's spelling, so run `/v1/expand` when you need the normalised form.

To check a US address against USPS data, pair these calls with a validator such as Smarty (https://www.smarty.com/articles/address-standardization-api) or Google Address Validation (https://developers.google.com/maps/documentation/address-validation/overview).

## Price

Each `/v1/parse` or `/v1/expand` request counts as one call. Free: 2,000 calls a month, no card. Paid: £19 for 25,000, £99 for 250,000, £399 for 1.5 million, hard monthly cap. https://parseaddr.com/pricing
