---
id: "nl_municipality_code"
kind: "pattern"
status: "stable"
is_pii: false
categories: ["geo", "government"]
country: ["NL"]
quality: 100
url: "http://registry.apicrafter.io/datatype/nl_municipality_code"
---

# Dutch municipality code (CBS) (`nl_municipality_code`)

Four-digit code of a Dutch municipality assigned by Statistics Netherlands (CBS), often written with the prefix GM, as in GM0363 for Amsterdam. CBS never reuses a whole code; a municipality created by a merger or renamed gets a new code that starts with 1, which may repeat the last three digits of an abolished municipality (1892 Zuidplas, from 0892). The code is the first four digits of the CBS district (nl_wijk_code) and neighbourhood (nl_buurt_code) codes; BAG identifiers (nl_bag_id) start with the code of the municipality that assigned them.

- Pattern of: `nl_municipality`
- Personal data (PII): no
- Categories: Geographic identifiers (geo), Government related (government)
- Countries: Netherlands (NL)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^(?:GM)?\d{4}$
```

## Examples

- `GM0363` — Amsterdam
- `0599` — Rotterdam
- `0518` — 's-Gravenhage (The Hague)
- `GM0344` — Utrecht
- `363` (invalid example) — Leading zero dropped
- `WK036300` (invalid example) — A district code, not a municipality code

## Mappings

- fta: `STATE_PROVINCE.MUNICIPALITY_CODE_NL`
- wikidata: `P382`

## Supported by tools

- `fta`

## Translations

- nl: Gemeentecode (CBS): Viercijferige code van een gemeente van het CBS, vaak met het voorvoegsel GM, zoals GM0363 voor Amsterdam.
- ru: Код муниципалитета Нидерландов (CBS): Четырёхзначный код муниципалитета, присвоенный статистическим бюро CBS, часто с префиксом GM, например GM0363 (Амстердам).

## Sources

- doc: <https://www.cbs.nl/nl-nl/dossier/nederland-regionaal/informatie-voor-gemeenten/codering-gebieden>
- doc: <https://www.cbs.nl/nl-nl/onze-diensten/methoden/classificaties/overig/gemeentelijke-indelingen-per-jaar/indeling-per-jaar/gemeentelijke-indeling-op-1-januari-2026>
- wikipedia: <https://en.wikipedia.org/wiki/Municipalities_of_the_Netherlands>
- wikidata: <https://www.wikidata.org/wiki/Property:P382>
- other: <https://github.com/tsegall/fta/blob/main/SemanticTypes.md>

## Quality

Score 100/100.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/nl_municipality_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/NL/geo/nl_municipality_code.yaml>
