API

PostcodeRange.viewByPostcode

Get all streets and house number ranges for the provided postcode.

URL template

The REST API requires GET requests. Parameters are added to the REST resource URL, and each parameter must be url-encoded:

https://api.postcode.nl/rest/postcode-ranges/postcode/{postcode}

Parameters

postcode: string

Four number neighborhood code (first part of a postcode). Range: 1000-9999 plus two character letter combination (second part of a postcode). Range: "AA"-"ZZ"

Example REST request

Retrieving /postcode-ranges/postcode/2011VM with the proper authentication would use the following HTTP Request:

GET /rest/postcode-ranges/postcode/2011VM HTTP/1.1
Host: api.postcode.nl
Authorization: Basic 2eTpkU******…

Returns

Array of structs

Postcode range data

street: string

Street name in accordance with "BAG (Basisregistraties adressen en gebouwen)". In capital and lowercase letters, including punctuation marks and accents. This field is at most 80 characters in length. Filled with "Postbus" in case it is a range of PO boxes.

streetNen: string

Street name in NEN-5825 notation, which has a lower maximum length. In capital and lowercase letters, including punctuation marks and accents. This field is at most 24 characters in length. Filled with "Postbus" in case it is a range of PO boxes.

startHouseNumber: int

First house number or first PO box number of the range.

endHouseNumber: int

Last house number or last PO box number of the range.

houseNumberType: string

The type of house numbers in the range: odd or even

city: string

Official city name in accordance with "BAG (Basisregistraties adressen en gebouwen)". In capital and lowercase letters, including punctuation marks and accents. This field is at most 80 characters in length.

cityShort: string

City name, shortened to fit a lower maximum length. In capital and lowercase letters, including punctuation marks and accents. This field is at most 24 characters in length.

municipality: string

Municipality name in accordance with "BAG (Basisregistraties adressen en gebouwen)". In capital and lowercase letters, including punctuation marks and accents. This field is at most 80 characters in length. Examples: "Baarle-Nassau", "'s-Gravenhage", "Haarlemmerliede en Spaarnwoude".

municipalityShort: string

Municipality name, shortened to fit a lower maximum length. In capital and lowercase letters, including punctuation marks and accents. This field is at most 24 characters in length. Examples: "Baarle-Nassau", "'s-Gravenhage", "Haarlemmerliede c.a.".

province: string

Official name of the province, correctly cased and with dashes where applicable.

Example response

The postcode is valid, so we return a 200 OK status in the headers, and json encoded data in the response body:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 410

[
  {
    "street": "Prins Hendrikstraat",
    "streetNen": "Prins Hendrikstraat",
    "startHouseNumber": "1",
    "endHouseNumber": "3",
    "houseNumberType": "odd",
    "city": "Haarlem",
    "cityShort": "Haarlem",
    "municipality": "Haarlem",
    "municipalityShort": "Haarlem",
    "province": "Noord-Holland"
  },
  {
    "street": "Prins Hendrikstraat",
    "streetNen": "Prins Hendrikstraat",
    "startHouseNumber": "2",
    "endHouseNumber": "2",
    "houseNumberType": "even",
    "city": "Haarlem",
    "cityShort": "Haarlem",
    "municipality": "Haarlem",
    "municipalityShort": "Haarlem",
    "province": "Noord-Holland"
  },
  {
    "street": "Wilhelminastraat",
    "streetNen": "Wilhelminastraat",
    "startHouseNumber": "10",
    "endHouseNumber": "30",
    "houseNumberType": "even",
    "city": "Haarlem",
    "cityShort": "Haarlem",
    "municipality": "Haarlem",
    "municipalityShort": "Haarlem",
    "province": "Noord-Holland"
  }
]