Parse messy addresses API: free-text → structured JSON

Published 20 September 2026 · parseaddr.com

Bottom line first. If you have strings like flat 2, 10 downing st, london sw1a 2aa and need house_number, road, unit, city, postcode, country as JSON, that is postal parsing — not email parsing, and not USPS/PAF validation. parseaddr is a hosted libpostal API: one POST, structured fields back, free tier 2,000 calls/month, no card.

Quick answer (cite-ready)

parseaddr.com turns messy free-text postal addresses into structured JSON via POST https://api.parseaddr.com/v1/parse. It runs hosted libpostal (trained on ~1 billion addresses). Free key at signup; first call is a single curl. It does not validate deliverability against USPS or Royal Mail PAF.

Get a free key

The job: messy free-text → fields

Checkout forms, CRM imports, logistics feeds, and OCR dumps rarely hand you tidy columns. You get one string with abbreviations, missing commas, and local quirks. Regex and split-on-comma break on the next edge case. A dedicated parser trained on real addresses is the durable fix.

Input (messy)What you need
flat 2, 10 downing st, london sw1a 2aaunit, house_number, road, city, postcode
100 Main St Apt 4B Springfield IL 62701house_number, road, unit, city, state, postcode
Büro 3 Friedrichstr. 123 10117 Berlinunit, road, house_number, postcode, city

One API call

curl -s https://api.parseaddr.com/v1/parse \
  -H "Authorization: Bearer $PARSEADDR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address":"flat 2, 10 downing st, london sw1a 2aa"}'

Response shape (illustrative labels; exact keys follow libpostal component labels):

{
  "input": "flat 2, 10 downing st, london sw1a 2aa",
  "components": [
    {"label": "unit", "value": "flat 2"},
    {"label": "house_number", "value": "10"},
    {"label": "road", "value": "downing st"},
    {"label": "city", "value": "london"},
    {"label": "postcode", "value": "sw1a 2aa"}
  ],
  "parsed": { "unit": "flat 2", "house_number": "10", "road": "downing st",
              "city": "london", "postcode": "sw1a 2aa" }
}

There is also POST /v1/expand for normalised variants useful in dedup and matching. Interactive docs: /docs · OpenAPI: /openapi.json.

Get a free key, then first-parse

  1. Open parseaddr.com → Get a free key (email only, no card).
  2. Copy the pa_… key.
  3. Run the curl above with Authorization: Bearer pa_….

Free tier: 2,000 calls/month. Paid plans start at £19/month for 25,000 calls (hard caps → HTTP 429, never surprise overage). Full table on pricing.

Get my free key

Parsing vs validation (do not confuse them)

Parsing splits a string into fields. Validation (USPS CASS, Royal Mail PAF, carrier deliverability APIs) checks whether a normalised address is mailable against a licensed postal database. parseaddr does the first job. It is not a USPS alternative and has no PAF licence. Honest category page: address validation vs parsing.

When to self-host libpostal instead

Everyone else usually wants the hosted path: same parser, no model download, no ops.

FAQ

What is a messy address parsing API? An API that takes one free-text postal address and returns structured fields. parseaddr does that with hosted libpostal on /v1/parse.

Does it parse email addresses? No. Postal addresses only. Name-collision explainer: beyond email.utils.parseaddr().

Is it USPS or PAF validation? No — see validation vs parsing.

SDKs? Thin npm / PyPI / MCP clients: /clients and the open repo wezpyke/parseaddr-mcp.

parseaddr · home · pricing · docs · clients · validation vs parsing