Autocomplete Belgiumbeta
Belgian addresses can be supplemented with this API call. The documentation for Dutch addresses can be found under autocomplete Netherlands.
The following information is required to fully validate a Belgian address:
- Postal number (also available from location)
- Street
- House number (with possibly a subaddress indication such as apartment or bus number)
There are various API calls available to create a user-friendly application where post number, place and street can be supplemented by only specifying the first numbers / letters.
Mandatory parameters
Use one of the two mandatory parameters:
- be_fourpp: enter the Belgian postal code (partial or full 4 digits), for province, municipality and city information.
- be_city: enter a (partial) Belgian city name, for province, municipality and postal code information.
Optional parameters
- street: enter a (partial) street to receive a list of streets that meet the specified (partial) street name. To be able to validate a street, the be_fourpp parameter is also mandatory.
- streetnumber: enter a house number. To be able to validate a house number, the full be_fourpp and street are required.
- subaddress: enter a sub-address (e.g. bus number or apartment number). To be able to validate a sub-address the full be_fourpp, street and streetnumber are required.
- language: Specify the language in which the city and street data are searched. Options are nl and fr. Both languages are searched by default.
- per_page: the maximum number of results that are returned. The default is 10.
Alert: Fields ‘province’, ‘municipality’, ‘city’ and ‘street’ have been included in the results for a short time. Since the export became multilingual at the beginning of July 2015, the ‘province_en’, ’province_fr’, ’municipality_en’, ’municipality_en’, ’city_en’, ’city_fr’, ’street_en’ and ’street_fr’ fields should be used.
Examples
Postcode Request
undefined/v1/autocomplete?auth_key=YOUR_AUTH_KEY&be_fourpp=1200
This request gives the following result:
{
"status": "ok",
"results": [
{
"province_nl": "Brussel",
"province_fr": "Bruxelles",
"municipality_nl": "Sint-lambrechts-woluwe",
"municipality_fr": "Woluwe-saint-lambert",
"city_nl": "Sint-lambrechts-woluwe",
"city_fr": "Woluwe-saint-lambert",
"fourpp": 1200,
"lat": null,
"lng": null
}
]
}
Street request
In this example, in addition to requesting a partial street name, the XML output format is also chosen.
undefined/v1/autocomplete?auth_key=YOUR_AUTH_KEY&be_fourpp=1200&street=a&format=xml
This request gives the following result:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>ok</status>
<results>
<result>
<street_nl>A. Marinusgaarde</street_nl>
</result>
<result>
<street_nl>A.en M.L. Servais-Kinetstraat</street_nl>
</result>
<result>
<street_nl>A.J. Slegersgaarde</street_nl>
</result>
<result>
<street_fr>Avenue Lambeau</street_fr>
</result>
</results>
</response>
Error messages
- ‘Invalid be_fourpp format’
Het formaat dient te bestaan uit 4 cijfers. Extra spatiëring en gebruik van hoofd- of kleine letters worden automatisch gecorrigeerd. - ‘Street number not found’
De ‘street number’ parameter is meegegeven maar het opgegeven huisnummer bestaat niet volgens onze database.
Example code
The autocomplete method is demonstrated in these ready-to-use examples: