1. Home
  2. Developer API information
  3. Belgium Step by step

Belgium Step by step

Autocomplete a Belgium address.

Note: This is the documentation for the v2 API which is still in beta.

Step 1: build the HTML page

We start by creating an empty HTML page, containing a minimal web page structure.

<!DOCTYPE html>
    <meta charset="UTF-8" />
    <title>Autocomplete tutorial</title>

Download our JavaScript library autocomplete.zip that allows us to integrate the Pro6PP webservice into this web page. Copy it in the same directory as you saved the above web page.

Add the following code between the <body> and </body> tags.

It adds the input fields for entering the address.

<form action="#" class="address">
    <label for="postcode">Postcode:</label>
    <input id="postcode" class="postcode">
    <label for="streetnumber">Streetnumber:</label>
    <input id="streetnumber" class="streetnumber" />
    <span class="message"></span>
    <label for="street">Street:</label>
    <input id="street" class="street" readonly />
    <label for="city">City:</label>
    <input id="city" class="city" readonly />

Step 2: add interaction

Add the following code between the <head> and </head> tags. It autocompletes the street and city when a full postcode is entered.

<script src="autocomplete.js"></script>
  var pro6pp_auth_key = 'YOUR_AUTH_KEY';
  $(document).ready(function () {

Step 3: make it work

To access the Pro6PP web service, you need to request your personal authorization key. This key is emailed to you right after signing up.

Replace the above placeholder YOUR_AUTH_KEY with your personal authorization key.

Step 4: see it in action

Open autocomplete.html in your browser. It's ready to use! It doesn't work? Try downloading the ready-to-use example code.

Looking for our v1 API?

v1 Documentation