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.
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 2aa | unit, house_number, road, city, postcode |
100 Main St Apt 4B Springfield IL 62701 | house_number, road, unit, city, state, postcode |
Büro 3 Friedrichstr. 123 10117 Berlin | unit, road, house_number, postcode, city |
curl -s https://api.parseaddr.com/v1/parse \
-H "Authorization: Bearer $PARSEADDR_API_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.
pa_… key.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.
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. More on the difference: address validation vs parsing.
Everyone else usually wants the hosted path: same parser, no model download, no ops.
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
Pyke Limited, registered in England and Wales, company number 09748427.