You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To expand address strings into normalized forms suitable for geocoder queries, use the `/expand` endpoint with the `address` query parameter. For example, to expand the address "Quatre-vingt-douze Ave des Ave des Champs-Élysées":
14
16
15
17
```bash
@@ -24,6 +26,42 @@ GET /expand?address=Quatre-vingt-douze%20Ave%20des%20Ave%20des%20Champs-Élysée
24
26
25
27
This will provide the expanded and normalized addresses ready for geocoding queries.
26
28
29
+
Support additional parameters:
30
+
31
+
-`languages`: An array of language codes (e.g., ["en", "fr"]) to help with expansion
32
+
-`address_components`: A bitmask of address components to expand
33
+
-`latin_ascii`: Transliterate to Latin ASCII (true/false)
34
+
-`transliterate`: Transliterate to the script of the first language (true/false)
35
+
-`strip_accents`: Strip accents from the address (true/false)
36
+
-`decompose`: Decompose diacritics and other characters (true/false)
37
+
-`lowercase`: Convert the address to lowercase (true/false)
38
+
-`trim_string`: Trim leading and trailing whitespace (true/false)
39
+
-`replace_word_hyphens`: Replace hyphens in words with spaces (true/false)
40
+
-`delete_word_hyphens`: Delete hyphens in words (true/false)
41
+
-`replace_numeric_hyphens`: Replace hyphens in numbers with spaces (true/false)
42
+
-`delete_numeric_hyphens`: Delete hyphens in numbers (true/false)
43
+
-`split_alpha_from_numeric`: Split alphabetic and numeric parts of the address (true/false)
44
+
-`delete_final_periods`: Deletes final periods (true/false)
45
+
-`delete_acronym_periods`: Deletes periods in acronyms (e.g., "U.S.A." -> "USA") (true/false)
46
+
-`drop_english_possessives`: Drops "'s" from the end of tokens (e.g., "St. James's" -> "St. James") (true/false)
-`roman_numerals`: Converts Roman numerals to integers (e.g., "II" -> "2") (true/false)
50
+
51
+
You also can select which parts of the address to expand. If not provided, a default set of components is used
52
+
53
+
-`address_name`: The name of a venue, organization, or building
54
+
-`address_house_number`: The house or building number
55
+
-`address_street`: The street name
56
+
-`address_po_box`: Post office box numbers
57
+
-`address_unit`: An apartment, suite, or office number
58
+
-`address_level`: A floor or level number
59
+
-`address_entrance`: An entrance identifier, like "Lobby A"
60
+
-`address_staircase`: A staircase identifier
61
+
-`address_postal_code`: The postal code
62
+
63
+
### Parse address
64
+
27
65
To parse addresses into components, use the `/parse` endpoint with the `address` query parameter. For example, to parse the address "781 Franklin Ave Crown Heights Brooklyn NY 11216 USA":
28
66
29
67
```bash
@@ -61,8 +99,15 @@ GET /parse?address=781%20Franklin%20Ave%20Crown%20Heights%20Brooklyn%20NY%201121
61
99
]
62
100
```
63
101
102
+
Support additional parameters:
103
+
104
+
-`language`: The language of the address (e.g., "en")
105
+
-`country`: The country of the address (e.g., "us")
106
+
64
107
This will break down the address into its [individual components](https://github.com/openvenues/libpostal?tab=readme-ov-file#parser-labels).
65
108
109
+
### Healthcheck
110
+
66
111
Endpoint `/health` can be use to check webserver healthcheck (like in k8s env):
0 commit comments