Parses and normalizes international addresses with statistical NLP, open geo data, and bindings for several languages. Includes CLI tools and optional Senzing model.
Overview
libpostal is a C library that turns free-form street addresses from around the world into structured, normalized text for search, deduplication, and geocoding pipelines. It is not a full geocoder but is intended as preprocessing so matching and indexing work across local conventions and languages.
The parser uses machine learning trained on large open address corpora. It labels components such as house number, road, city, postcode, and unit. A separate expansion API normalizes spelling and abbreviations across many languages, with an OSM-trained language classifier choosing normalizations.
The core ships with officially supported bindings for Python, Ruby, Go, Java, PHP, and Node.js, plus command-line expand and interactive parser tools. Install paths are documented for Mac and Linux via Homebrew, MacPorts, or source build, and for Windows via MSys2/MinGW.
An optional Senzing data model improves parsing for some US, UK, and Singapore addresses at the cost of a larger on-disk model. libpostal is aimed at applications that index or compare location strings internationally.
Key features
- International address parsing API
- Address expansion and normalization
- ML parser trained on global data
- OSM-based language detection
- Python Ruby Go Java PHP Node bindings
- CLI expand and addressparser tools
- Optional Senzing parsing model
- pkg-config linking support
Use cases
- Geocoding preprocessing pipelines
- Address deduplication and record linkage
- Search indexing of location strings
- Normalizing messy user-entered addresses