postal-api
v1.0.2
Published
REST API server for libpostal
Downloads
25
Maintainers
Readme
postal-api
REST API server for libpostal
Install
$ npm install --global postal-api
Please note that postal-api is using postal-async and it expects that
libpostal data is located in /var/lib/libpostal
.
See libpostal docs on how to download the data.
API
parse
curl 'http://localhost:4030/parse?address=781+Franklin+Ave+Crown+Hts+Brooklyn+NY'
[
{
"label": "house_number",
"value": "781"
},
{
"label": "road",
"value": "franklin ave"
},
{
"label": "suburb",
"value": "crown hts"
},
{
"label": "city_district",
"value": "brooklyn"
},
{
"label": "state",
"value": "ny"
}
]
expand
curl 'http://localhost:4030/expand?address=781+Franklin+Ave+Crown+Hts+Brooklyn+NY'
[
"781 franklin avenue crown heights brooklyn ny",
"781 franklin avenue crown heights brooklyn new york"
]
Environment
postal-api
is using dotenv and by default reads its environment from /etc/default/postal-api
POSTAL_API_PORT
- port number on which postal-api listens, defaults to 4030
License
MIT © Damian Krzeminski