Autocomplete address Openpostcode.nl

Hello,

I’m trying to set up an address autocomplete feature in a Bricks Builder form using the free ZIP code API from openpostcode.nl. The goal is to automatically fill in the street (straat) and city (woonplaats) fields after entering a ZIP code and house number, triggered by a “Search Address” button.

The openpostcode.nl API is simple, no authentication needed and completely free. I’ve managed to retrieve the data using the Bricks Query Manager, but I’m not sure how to pass that data into my form fields.

API GET: https://openpostcode.nl/api/address

URL Parameters:
Key=postcode > Value=1017XN
Key=huisnummer > Value=42

API response data:

In my form, I’ve set up the following fields:

  • postcode
  • huisnummer
  • straat
  • woonplaats

How can I use the fetched data to populate these form fields?

After obtaining the data you need to tell Bricks what to use by creating keys for it.

Thanks! I understand how the query loop works and how to expose keys from the API response, that part makes sense.

What I’m still struggling with is how to actually trigger the fetch on button click inside a Bricks form. In my case, I want the user to enter the postcode + huisnummer, then click a “Search Address” button, and after that the form fields (straat, woonplaats) should be populated with the returned API data.