dataconnect/postcode-api

Postcode API client voor postcodeapi.nu v3

Maintainers

Package info

gitlab.com/dataconnect-packages/postcode-api

Issues

pkg:composer/dataconnect/postcode-api

Statistics

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 0

1.0.0 2026-05-30 11:14 UTC

This package is auto-updated.

Last update: 2026-05-30 09:22:52 UTC


README

PHP client for postcodeapi.nu v3.
Retrieve Dutch address data (street, city, province, coordinates) based on postcode and house number.

Requirements

postcode-api requires PHP 8.1 or above.

Installation

Can be installed with Composer.

To get the latest version of postcode-api use:

composer require dataconnect/postcode-api

Example

use PostcodeApi\PostcodeApiClient;

$client = new PostcodeApiClient('your-api-key');
$response = $client->lookup('6545CA', '29');

if ($response->ok) {
    echo $response->straatnaam;   // Waldeck Pyrmontsingel
    echo $response->plaats;       // Nijmegen
    echo $response->provincie;    // Gelderland
    echo $response->lengtegraad;  // 5.858910
    echo $response->breedtegraad; // 51.843765
} else {
    echo $response->error; // Error message
}

// Or as array (for JSON responses):
$array = $response->toArray();

Support

Want to support our work? A donation is very welcome: https://buymeacoffee.com/dataconnect

Contact

Please feel free to contact us, to add options if possible!