API Documentatie

Complete handleiding voor het gebruik van de Postcode API

Aan de Slag

Welkom bij de Strikeweb API. Deze RESTful API stelt je in staat om adresgegevens op te halen met je API key.

Base URL: https://api.strikeweb.nl
Authenticatie

Alle API verzoeken vereisen authenticatie via een API key. Je kunt je API keys beheren in het admin dashboard.

Authenticatie Methodes
  • Query Parameter: ?api_key=YOUR_KEY
  • Header: X-API-Key: YOUR_KEY
  • Bearer Token: Authorization: Bearer YOUR_KEY
GET /api/address/lookup

Zoek een adres op basis van postcode en huisnummer.

Parameters
Parameter Type Required Beschrijving
postcode string Ja Nederlandse postcode (bijv. 1234AB)
huisnummer integer Ja Huisnummer
toevoeging string Optioneel Huisnummer toevoeging (bijv. A, B, 1)
api_key string Ja Je API key
Code Voorbeelden
Terminal
curl -X GET "https://api.strikeweb.nl/api/address/lookup?postcode=1011AC&huisnummer=1&api_key=YOUR_API_KEY"
address_lookup.php
<?php
$apiKey = 'YOUR_API_KEY';
$postcode = '1011AC';
$huisnummer = 1;

$url = "https://api.strikeweb.nl/api/address/lookup?" . http_build_query([
    'postcode' => $postcode,
    'huisnummer' => $huisnummer,
    'api_key' => $apiKey
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);

if ($data['success']) {
    echo "Straat: " . $data['data']['straatnaam'] . "\n";
    echo "Woonplaats: " . $data['data']['woonplaats'] . "\n";
} else {
    echo "Error: " . $data['error'] . "\n";
}
?>
address_lookup.js
const apiKey = 'YOUR_API_KEY';
const postcode = '1011AC';
const huisnummer = 1;

const url = `https://api.strikeweb.nl/api/address/lookup?postcode=${postcode}&huisnummer=${huisnummer}&api_key=${apiKey}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    if (data.success) {
      console.log('Straat:', data.data.straatnaam);
      console.log('Woonplaats:', data.data.woonplaats);
    } else {
      console.error('Error:', data.error);
    }
  })
  .catch(error => console.error('Request failed:', error));
address_lookup.py
import requests

api_key = 'YOUR_API_KEY'
postcode = '1011AC'
huisnummer = 1

url = 'https://api.strikeweb.nl/api/address/lookup'
params = {
    'postcode': postcode,
    'huisnummer': huisnummer,
    'api_key': api_key
}

response = requests.get(url, params=params)
data = response.json()

if data['success']:
    print(f"Straat: {data['data']['straatnaam']}")
    print(f"Woonplaats: {data['data']['woonplaats']}")
else:
    print(f"Error: {data['error']}")
AddressLookup.cs
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

class AddressLookup
{
    static async Task Main()
    {
        string apiKey = "YOUR_API_KEY";
        string postcode = "1011AC";
        int huisnummer = 1;
        
        string url = $"https://api.strikeweb.nl/api/address/lookup?postcode={postcode}&huisnummer={huisnummer}&api_key={apiKey}";
        
        using (HttpClient client = new HttpClient())
        {
            var response = await client.GetStringAsync(url);
            var data = JObject.Parse(response);
            
            if ((bool)data["success"])
            {
                Console.WriteLine($"Straat: {data["data"]["straatnaam"]}");
                Console.WriteLine($"Woonplaats: {data["data"]["woonplaats"]}");
            }
            else
            {
                Console.WriteLine($"Error: {data["error"]}");
            }
        }
    }
}
Response Voorbeeld
200 OK - Success
{
  "success": true,
  "data": {
    "straatnaam": "Dam",
    "huisnummer": "1",
    "postcode": "1011AC",
    "woonplaats": "Amsterdam",
    "provincie": "Noord-Holland"
  }
}
400 Bad Request - Error
{
  "success": false,
  "error": "Postcode en huisnummer zijn verplicht"
}
GET /address/verify

Verifieer een adres tegen onze database. Controleer of een postcode en huisnummer geldig zijn.

Parameters
Parameter Type Required Beschrijving
postcode string Ja Nederlandse postcode (bijv. 6131BE)
huisnummer integer Ja Huisnummer
straat string Ja Straatnaam
woonplaats string Ja Woonplaatsnaam
toevoeging string Optioneel Huisletter/toevoeging (bijv. A, B, 1)
api_key string Ja Je API key
Code Voorbeelden
Terminal
curl -X GET "https://api.strikeweb.nl/address/verify?postcode=6131BE&huisnummer=32&straat=Straatname&woonplaats=Roggel&api_key=YOUR_API_KEY"
address_verify.php
<?php
$apiKey = 'YOUR_API_KEY';
$postcode = '6131BE';
$huisnummer = 32;
$straat = 'Straatname';
$woonplaats = 'Roggel';

$url = "https://api.strikeweb.nl/address/verify?" . http_build_query([
    'postcode' => $postcode,
    'huisnummer' => $huisnummer,
    'straat' => $straat,
    'woonplaats' => $woonplaats,
    'api_key' => $apiKey
]);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);

if ($data['success']) {
    if ($data['valid']) {
        echo "✓ Adres is geldig!\n";
        foreach ($data['addresses'] as $addr) {
            echo "Straat: " . $addr['street'] . "\n";
            echo "Plaats: " . $addr['city'] . "\n";
        }
    } else {
        echo "✗ Adres niet gevonden\n";
    }
} else {
    echo "Error: " . $data['error'] . "\n";
}
?>
address_verify.js
const apiKey = 'YOUR_API_KEY';
const postcode = '6131BE';
const huisnummer = 32;
const straat = 'Straatname';
const woonplaats = 'Roggel';

const params = new URLSearchParams({
  postcode: postcode,
  huisnummer: huisnummer,
  straat: straat,
  woonplaats: woonplaats,
  api_key: apiKey
});

const url = `https://api.strikeweb.nl/address/verify?${params}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    if (data.success) {
      if (data.valid) {
        console.log('✓ Adres is geldig!');
        data.addresses.forEach(addr => {
          console.log(`${addr.street}, ${addr.city}`);
        });
      } else {
        console.log('✗ Adres niet gevonden');
      }
    } else {
      console.error('Error:', data.error);
    }
  })
  .catch(error => console.error('Request failed:', error));
address_verify.py
import requests

api_key = 'YOUR_API_KEY'
postcode = '6131BE'
huisnummer = 32
straat = 'Straatname'
woonplaats = 'Roggel'

url = 'https://api.strikeweb.nl/address/verify'
params = {
    'postcode': postcode,
    'huisnummer': huisnummer,
    'straat': straat,
    'woonplaats': woonplaats,
    'api_key': api_key
}

response = requests.get(url, params=params)
data = response.json()

if data['success']:
    if data['valid']:
        print('✓ Adres is geldig!')
        for addr in data['addresses']:
            print(f"{addr['street']}, {addr['city']}")
    else:
        print('✗ Adres niet gevonden')
else:
    print(f"Error: {data['error']}")
AddressVerify.cs
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

class AddressVerify
{
    static async Task Main()
    {
        string apiKey = "YOUR_API_KEY";
        string postcode = "6131BE";
        int huisnummer = 32;
        string straat = "Straatname";
        string woonplaats = "Roggel";
        
        string url = $"https://api.strikeweb.nl/address/verify?" +
            $"postcode={postcode}&" +
            $"huisnummer={huisnummer}&" +
            $"straat={System.Net.WebUtility.UrlEncode(straat)}&" +
            $"woonplaats={System.Net.WebUtility.UrlEncode(woonplaats)}&" +
            $"api_key={apiKey}";
        
        using (HttpClient client = new HttpClient())
        {
            var response = await client.GetStringAsync(url);
            var data = JObject.Parse(response);
            
            if ((bool)data["success"])
            {
                if ((bool)data["valid"])
                {
                    Console.WriteLine("✓ Adres is geldig!");
                    foreach (var addr in data["addresses"])
                    {
                        Console.WriteLine($"{addr["street"]}, {addr["city"]}");
                    }
                }
                else
                {
                    Console.WriteLine("✗ Adres niet gevonden");
                }
            }
            else
            {
                Console.WriteLine($"Error: {data["error"]}");
            }
        }
    }
}
Response Voorbeeld
200 OK - Geldig adres
{
  "success": true,
  "valid": true,
  "found_addresses": 1,
  "addresses": [
    {
      "valid": true,
      "postcode": "6131BE",
      "house_number": "32",
      "house_letter": "A",
      "street": "Straatname",
      "city": "Roggel",
      "province": "Limburg"
    }
  ]
}
200 OK - Adres niet gevonden
{
  "success": true,
  "valid": false,
  "message": "Address not found in database"
}
HTTP Status Codes
Code Betekenis Beschrijving
200 OK Request succesvol verwerkt
400 Bad Request Ongeldige parameters
401 Unauthorized Ongeldige of ontbrekende API key
403 Forbidden Onvoldoende rechten voor dit endpoint
404 Not Found Adres niet gevonden
429 Too Many Requests Rate limit overschreden
500 Internal Server Error Server fout
Rate Limiting

Standaard rate limits zijn ingesteld om misbruik te voorkomen. Bij overschrijding ontvang je een 429 Too Many Requests response.

Response Headers:
  • X-RateLimit-Limit: Maximum aantal requests
  • X-RateLimit-Remaining: Resterende requests
  • X-RateLimit-Reset: Tijdstip wanneer limit reset
Support

Heb je vragen of problemen met de API? Log in op je dashboard om je API keys te beheren, je verbruik te bekijken en support te contacteren.

Naar Dashboard