In many cases, thinking especially of companies in Belgium with a Belgian customer base, this is not necessary at all. Usually, being able to look up addresses in Belgium is more than enough. To go to a mega GIS provider like Google maps or Openstreetmaps especially for this purpose is usually much too big and the costs are much higher. In order not to have to take this into account, we use the GEOpunt and Address Register API of the Flemish government. These are GIS APIs that provide the government with up-to-date address data for searching and suggesting in Belgium.
To give a practical example, let's mention one of our projects: "Vlaams Steunpunt Vrijwilligerswerk - Vrijwilligersverzekering (VSVW)".
The customer asked for the possibility for volunteers to enter their address with an auto suggestion of only Flemish addresses. Admittedly with a failsafe that the moment the API would not be available they could manually enter their address and it could be checked via the address registry API.
For address suggestion, we used the GEOpunt API. Likewise, this is an API they provide where autosuggestion endpoints are already included. Currently, it is still working with CRAB. Just know, though, that CRAB support will be ended at the end of 2023 (info). Now they have already informed us that they are going to update the API so that it does not lag on old data and it will be linked with the Address Registry in the future.
As mentioned earlier, we used the GEOpunt API for autosuggestion. This API provides a numerous endpoint that allow you to integrate this autosuggestion according to the needs of your application.
For us, the best application was to use the V4 Location API since we needed to port pre-existing functionality that used the same logic as the return data from the endpoint.
The address register is the latest application of the Flemish government to search and validate addresses. It has been completely updated and pulled away from CRAB so that it can work with the most recent data. Unfortunately, it does not yet possess the ability to autosuggest addresses. What was important to us is the validation of PO Box information. In the GEOpunt API, only the house number can be validated but the address register also validates the necessary PO Box info.
In this example we used /v1/adresmatch
Specifically, we have integrated both APIs in the following way. Autosuggestion of addresses is done by the GEOpunt API. It fills in the necessary fields in the form.
Once the data is submitted, it will be validated by the Address Registry API. It will take into account the PO box/apt info you manually provided.
If your address is not correct? It will do the necessary error validation so that the end user knows his/her address does not exist and can make the necessary adjustments.
Address suggestions and validation is something we have already implemented on several projects, such as Brugge TDMS. We also used the same functionalities. Here we created a Vue component in Laravel Nova that suggests and validates addresses based on CRAB format in order to succeed in the database in the correct format. Another good use case for not having to resort to a large GIS provider but to a data point closer to home.