Skip to content

Radius API

In the examples below, the following address is used:
Amersfoort Krankeledenstraat 30 3811BN.

This address Our Lady Tower - Amersfoort, is the central point according to the Dutch map projection of the National Triangulation (with coordinates +155 000 m +463 000 m).

With the Radius API, it is possible to look up postcodes within a radius of up to 500 metres.

Using the Radius API

Using the Radius API is similar to using the DirectMatch API. However, we use latitude and longitude instead of postcode and house number.

Be careful not to mix up the order of the lat (latitude) and lon (longitude). Latitude first, then longitude.

Example 1: Our Lady Tower - Amersfoort

This example has the following lat and lon: 52.155172, 5.387201 .

HTTP Request:

GET /v1/radius/nl/52.155172/5.387201
Headers: Authorization: Bearer YOUR_API_KEY

HTTP JSON Response from https://api.postcode-api.nl: When exactly 1 result is found, the API returns the address object directly:

{
  "city": "Amersfoort",
  "housenumber": "30",
  "municipality": "Amersfoort",
  "postcode": "3811BN",
  "province": "Utrecht",
  "street": "Krankeledenstraat",
  "location": {
    "rd": [
      155014.59,
      462985.67
    ],
    "wgs84": [
      52.15504560250615,
      5.387419406464223
    ]
  }
}

Example 2: Our Lady Tower - Amersfoort with radius

This example has the following lat and lon: 52.155172, 5.387201. And a radius of 20 metres.

HTTP Request:

GET /v1/radius/nl/52.155172/5.387201/20
Headers: Authorization: Bearer YOUR_API_KEY

HTTP JSON Response from https://api.postcode-api.nl: When multiple results are found, the API returns an object with results and pagination:

{
  "results": [
    {
      "housenumber": "28",
      "houseletter": "A",
      "postcode": "3811BN",
      "city": "Amersfoort",
      "street": "Krankeledenstraat",
      "municipality": "Amersfoort",
      "province": "Utrecht",
      "location": {
        "rd": [
          155004.208,
          462982.31
        ],
        "wgs84": [
          52.15501540345856,
          5.387267698932604
        ]
      }
    },
    {
      "housenumber": "28",
      "postcode": "3811BN",
      "city": "Amersfoort",
      "street": "Krankeledenstraat",
      "municipality": "Amersfoort",
      "province": "Utrecht",
      "location": {
        "rd": [
          155013.289,
          462987.937
        ],
        "wgs84": [
          52.15506597819764,
          5.387400395715372
        ]
      }
    },
    {
      "housenumber": "30",
      "postcode": "3811BN",
      "city": "Amersfoort",
      "street": "Krankeledenstraat",
      "municipality": "Amersfoort",
      "province": "Utrecht",
      "location": {
        "rd": [
          155000.0,
          463000.0
        ],
        "wgs84": [
          52.1551744,
          5.38720621
        ]
      }
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total_count": 3,
    "total_pages": 1
  }
}

Latitude and longitude data differences

Differences are often observable between different datasets. This can occur due to multiple factors:

  • Transformations between different systems
  • Precision and rounding (six decimal places vs eight decimal places)
  • Different versions of WGS84

But the actual mapping of the chart itself also ultimately plays a role. Thus there are already differences between Google Maps/Apple Maps and Bing Maps.