PHPackages                             devmobgroup/postcodes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. devmobgroup/postcodes

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

devmobgroup/postcodes
=====================

Abstraction layer for fetching Dutch postcode data.

0.1.0(7y ago)24413MITPHPPHP &gt;=7.1

Since Oct 4Pushed 7y agoCompare

[ Source](https://github.com/devmobgroup/postcodes)[ Packagist](https://packagist.org/packages/devmobgroup/postcodes)[ RSS](/packages/devmobgroup-postcodes/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (2)Used By (3)

Postcodes package
=================

[](#postcodes-package)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/eaabbf8d79b4876f3e7e20fa90791585dcf5432f89bff3ba2f2dfe94be90c60f/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3134393735363332372f736869656c64)](https://github.styleci.io/repos/149756327)

This package provides some basic functionality that can be implemented for specific postcode APIs. This package alone **does not** provide immediate access to postcode data.

Install
-------

[](#install)

1. Install the base package:

    ```
    composer require devmobgroup/postcodes

    ```
2. Choose a postcode provider or [create your own](https://github.com/devmobgroup/postcodes/blob/master/EXTENDING.md). You can find all of our own provider implementations [in this repository](https://github.com/devmobgroup/postcodes-providers).

    - **PostcodeAPI.nu** (recommended) [postcodeapi.nu](https://www.postcodeapi.nu)

        ```
        composer require devmobgroup/postcodes-postcode-api-nu

        ```
    - **API Postcode**[api-postcode.nl](https://api-postcode.nl)

        ```
        composer require devmobgroup/postcodes-api-postcode

        ```

    Read more about [using and configuring these providers](https://github.com/devmobgroup/postcodes-providers#postcodes-providers).

Usage
-----

[](#usage)

All providers implement the [`ProviderInterface`](https://github.com/devmobgroup/postcodes/blob/master/src/Providers/ProviderInterface.php)which has a lookup method:

```
$provider->lookup(string $postcode, string $number);
```

This method returns an **array** of [`Address`](https://github.com/devmobgroup/postcodes/blob/master/src/Address/Address.php)instances. This array should never be empty, because instead the `NoSuchCombinationException` exception indicates no results were found.

```
$address = $addresses[0];

$address->getPostcode(); // '3011 ED'
$address->getHouseNumber(); // '50'
$address->getStreet(); // 'Schiedamsedijk'
$address->getCity(); // 'Rotterdam'
$address->getProvince(); // 'Zuid-Holland'
$address->getLatitude(); // '51.9147442'
$address->getLongitude(); // '4.4766394'
```

There's also a `getRaw()` method which usually contains an array of the raw data retrieved from the provider:

```
$address->getRaw(); // ['city' => 'Rotterdam', 'year' => 1990, ...]
```

Additionally, the `lookup()` method throws exceptions that should be caught.

```
use DevMob\Postcodes\Exceptions\NoSuchCombinationException;
use DevMob\Postcodes\Exceptions\PostcodesException;

try {
    $provider->lookup('3011ED', '50');
} catch (NoSuchCombinationException $e) {
    // Combination of postcode and house number not found
} catch (PostcodesException $e) {
    // Catch-all interface for other exceptions.
    // It's best to always catch these exceptions, because
    // providers may implement their own exceptions that
    // are not documented in the ProviderInterface.
}
```

Extending
---------

[](#extending)

[Read more about creating your own provider](https://github.com/devmobgroup/postcodes/blob/master/EXTENDING.md).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2827d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43471216?v=4)[DevMob Group](/maintainers/devmobgroup)[@devmobgroup](https://github.com/devmobgroup)

---

Top Contributors

[![maartenpaauw](https://avatars.githubusercontent.com/u/4550875?v=4)](https://github.com/maartenpaauw "maartenpaauw (2 commits)")[![devfrey](https://avatars.githubusercontent.com/u/1571879?v=4)](https://github.com/devfrey "devfrey (1 commits)")

---

Tags

nlphppostcodes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devmobgroup-postcodes/health.svg)

```
[![Health](https://phpackages.com/badges/devmobgroup-postcodes/health.svg)](https://phpackages.com/packages/devmobgroup-postcodes)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k34](/packages/neuron-core-neuron-ai)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M110](/packages/google-cloud-core)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[spatie/laravel-export

Create a static site bundle from a Laravel app

673139.5k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66140.1k109](/packages/oat-sa-tao-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
