# Dutch Address Lookup API: BAG postcode, geocode & building data (`bosco_labs/dutch-address-lookup`) Actor

Validates and geocodes Dutch addresses against the official BAG register (via PDOK): postcode, BAG ids, WGS84 + RD coordinates, construction year, use, floor area and building status. Free text, postcode + house number (or range) or BAG ids; up to 100 per run. Unmatched inputs are free.

- **URL**: https://apify.com/bosco_labs/dutch-address-lookup.md
- **Developed by:** [Bosco Labs](https://apify.com/bosco_labs) (community)
- **Categories:** Business, Lead generation, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 addresses

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Dutch Address Lookup API: BAG postcode, geocode & building data

**Checks and geocodes Dutch addresses against the BAG**, the official Dutch register of
addresses and buildings (Kadaster, served by PDOK). Each address comes back normalised with
its postcode, BAG ids, WGS84 and RD coordinates, and building details: construction year,
use, floor area, status and number of units. Built for **AI agents** doing real estate,
logistics, KYC/KYB, insurance or local-business tasks, and for people cleaning address lists.

**Pricing (pay per event):** $0.002 per resolved address. Inputs that don't resolve to one
address (ambiguous, not found, invalid) are returned too, free of charge.

### What you get

One row per input address. A postcode query gives one row per address found. Real output for
`{"addresses": ["Damrak 1 Amsterdam", "Dam 5 Amsterdam"]}` (run 2026-11-05):

```json
{
  "schema_version": "1",
  "input": "Damrak 1 Amsterdam",
  "input_type": "address",
  "resolved": true,
  "match_quality": "exact",
  "match_score": 11.179252,
  "address": {
    "display_name": "Damrak 1, 1012LG Amsterdam",
    "street": "Damrak",
    "house_number": 1,
    "house_letter": null,
    "house_number_addition": null,
    "postcode": "1012LG",
    "city": "Amsterdam",
    "municipality": "Amsterdam",
    "municipality_code": "0363",
    "province": "Noord-Holland"
  },
  "bag_ids": {
    "nummeraanduiding_id": "0363200012113669",
    "verblijfsobject_id": "0363010012111931",
    "object_type": "verblijfsobject",
    "pand_ids": ["0363100012185508"]
  },
  "coordinates": {"lat": 52.37714446, "lon": 4.89803846, "rd_x": 121691.143, "rd_y": 487809.576},
  "building": {
    "object_type": "verblijfsobject",
    "object_id": "0363010012111931",
    "object_status": "Verblijfsobject in gebruik",
    "use_purposes": ["bijeenkomstfunctie", "logiesfunctie"],
    "floor_area_m2": 16100,
    "construction_year": 1890,
    "building_status": "Pand in gebruik",
    "units_in_building": 5,
    "pands": [
      {
        "pand_id": "0363100012185508",
        "construction_year": 1890,
        "status": "Pand in gebruik",
        "units_in_building": 5,
        "use_purposes": ["bijeenkomstfunctie", "logiesfunctie", "winkelfunctie"],
        "source_url": "https://api.pdok.nl/kadaster/bag/ogc/v2/collections/pand/items?f=json&identificatie=0363100012185508"
      }
    ],
    "source_url": "https://api.pdok.nl/kadaster/bag/ogc/v2/collections/verblijfsobject/items?f=json&identificatie=0363010012111931"
  },
  "candidates": [],
  "warnings": [],
  "source_url": "https://api.pdok.nl/bzk/locatieserver/search/v3_1/free?q=*:*&fq=nummeraanduiding_id:0363200012113669&fl=*",
  "retrieved_at": "2026-11-05T22:43:17+00:00"
}
```

"Dam 5" has 20 units (5B, 5C, ...), so that input is not guessed. It comes back free, with
the reason and the top 3 candidates:

```json
{
  "input": "Dam 5 Amsterdam",
  "resolved": false,
  "match_quality": "ambiguous",
  "address": null,
  "building": null,
  "coordinates": null,
  "candidates": [
    {"display_name": "Dam 5B, 1012JS Amsterdam", "postcode": "1012JS", "nummeraanduiding_id": "0363200012111807", "score": 9.622645},
    {"display_name": "Dam 5C, 1012JS Amsterdam", "postcode": "1012JS", "nummeraanduiding_id": "0363200012111808", "score": 9.622645},
    {"display_name": "Dam 5D, 1012JS Amsterdam", "postcode": "1012JS", "nummeraanduiding_id": "0363200012111809", "score": 9.622645}
  ],
  "warnings": ["House number 5 has 20 units with an addition; add the letter or addition (e.g. '5B', '18-1')."]
}
```

#### Key fields

- **`match_quality`**: one of

  - `exact`: every part you gave agrees with the BAG.
  - `probable`: exactly one address fits, but part of the input differs (see `warnings`).
  - `ambiguous`: several addresses fit; see `candidates`.
  - `not_found`
  - `invalid_input`
  - `source_error`: PDOK did not answer.

  Only `exact` and `probable` rows are `resolved` and charged.
- **`building.use_purposes`**: the BAG use purposes (gebruiksdoel) of the unit, in Dutch:
  `woonfunctie` (residential), `kantoorfunctie` (office), `winkelfunctie` (retail),
  `bijeenkomstfunctie` (assembly, e.g. hospitality), `logiesfunctie` (lodging),
  `industriefunctie`, `onderwijsfunctie`, `gezondheidszorgfunctie`, `sportfunctie`,
  `celfunctie`, `overige gebruiksfunctie`.
- **`building.floor_area_m2`**: the unit's usable floor area (gebruiksoppervlakte) in m².
  It is the area of the unit, not of the whole building.
- **`building.construction_year`**, **`building_status`**, **`units_in_building`**: from the
  building (pand) the unit is in. A unit spread over several buildings lists each one in
  `pands`.
- **`coordinates`**: the address point in WGS84 (`lat`, `lon`) and in Dutch RD New metres
  (`rd_x`, `rd_y`, EPSG:28992).

### Input

Three ways to ask. They can be combined in one run.

```json
{ "addresses": ["Damrak 1 Amsterdam", "Coolsingel 40, 3011AD Rotterdam", "1012LG 1", "Damrak 18-1 Amsterdam"] }
```

```json
{ "postcode": "1012JS", "houseNumber": 1, "houseNumberTo": 20 }
```

```json
{ "bagIds": ["0363200012113669", "0363100012185508"], "include": ["building"] }
```

| Field | Meaning |
|---|---|
| `addresses` | Up to 100 free-text addresses: street + number (+ letter/addition) + city, and/or postcode + number |
| `postcode` | `1012JS` or `1012 JS`. On its own: every address in the postcode (max 100) |
| `houseNumber` / `houseNumberTo` | One number, or an inclusive range, within `postcode` |
| `houseNumberAddition` | House letter and/or addition for one number: `B`, `1`, `H`, `A2`. Empty = all units at that number |
| `bagIds` | 16-digit BAG ids. A pand (building) id returns building details only |
| `include` | Any of `address`, `building`, `coordinates`. Default all. BAG ids are always returned |

**How free text is matched.**

1. The postcode, house number, letter and addition are read from the text.
2. BAG addresses with that number (and postcode) are looked up.
3. The street and city words are compared with each result.

Accents, case, punctuation, "2e"/"Tweede" and "Den Haag"/"'s-Gravenhage" don't matter. A
missing city is fine when the street and number exist in only one place; otherwise the row is
`ambiguous`, with one candidate per place. Typos in street names are not corrected: "Damrk 1
Amsterdam" is `not_found`. If you give a postcode, the postcode and number decide.

### Use from an AI agent (MCP)

Agents can call this Actor as a tool through the
[Apify MCP server](https://github.com/apify/apify-mcp-server). Add this server URL to your MCP
client (Claude, Cursor, VS Code, ...):

```text
https://mcp.apify.com?tools=bosco_labs/dutch-address-lookup
```

It loads this Actor as a tool, plus the tools that read its results (`get-actor-run`,
`get-dataset-items`). The hosted server signs you in with OAuth, or accepts your Apify token as
`Authorization: Bearer <APIFY_TOKEN>`.

Example prompt: *"Is 'Damrak 1 Amsterdam' a valid address? Give me its postcode, building
year, use and floor area, with the source."* The agent passes:

```json
{ "addresses": ["Damrak 1 Amsterdam"] }
```

**Output for agents:**

- About 1.6 KB per address.
- Stable `snake_case` fields; `null` for unknown; arrays are never null.
- `match_quality` + `warnings` say in plain words what to fix.
- `candidates` carries the `nummeraanduiding_id` to retry with exactly (`bagIds`).

Measured locally on 2026-11-05: 20 addresses with buildings in 1.2 s, and a whole postcode
range (29 addresses) in 1.1 s.

**Cost:** $0.002 per resolved address, billed to the Apify account the MCP server is signed in
with. Unresolved inputs are free.

### FAQ

**Where does the data come from?** From the BAG (Basisregistratie Adressen en Gebouwen),
kept by the municipalities and published by Kadaster. Addresses come from the PDOK
Locatieserver and buildings from the PDOK BAG OGC API. Both are updated daily. Each row's
`source_url` points to the PDOK record it was read from.

**What is not included?** This lookup does not include:

- WOZ (tax) values, energy labels, prices or rents.
- Owners, residents or any other personal data.
- Cadastral parcels, building footprints/polygons, neighbourhood statistics.
- Addresses outside the Netherlands.

`floor_area_m2` is the BAG gebruiksoppervlakte of one unit. It is not the plot size and not
the full building.

**Why is a valid-looking address `ambiguous`?** Usually the number has several units (5A,
5B, 18-1, 18-H) and no letter or addition was given, or the same street and number exist in
several places and no city or postcode was given. Add it, or use a candidate's
`nummeraanduiding_id` in `bagIds`.

**Why is `construction_year` odd sometimes?** Construction years are as registered by the
municipality. Very old buildings often carry an estimated year (e.g. 1600, 1850).

**Are demolished buildings or withdrawn addresses returned?** Address search covers current
BAG addresses. A pand id of a demolished building still returns its record, with
`building_status` "Pand gesloopt".

**Limits?**

- 100 addresses + BAG ids per run, and up to 100 addresses per postcode query. A larger
  postcode result says so in `warnings`; narrow the house number range.
- PDOK is a free best-effort service. If it does not answer, rows are marked `source_error`
  and not charged.

**Licence and attribution.** BAG data: Kadaster, Public Domain Mark 1.0, served by PDOK. No
endorsement by Kadaster or PDOK is implied. See `LEGAL.md`.

# Actor input Schema

## `addresses` (type: `array`):

Dutch addresses to check and geocode, one per line, as people write them: street + house number (+ letter or addition) + city, and/or postcode + house number, e.g. "Damrak 1 Amsterdam", "Dam 5B Amsterdam", "Damrak 18-1 Amsterdam", "Coolsingel 40, 3011AD Rotterdam", "1012LG 1". Up to 100 (together with bagIds); repeats are looked up once. One output row per address. Empty = use postcode or bagIds.

## `postcode` (type: `string`):

A Dutch postcode, 4 digits + 2 letters, e.g. "1012JS" or "1012 JS". Alone it lists every address in that postcode (one row each, up to 100); with houseNumber it returns that address, with houseNumber + houseNumberTo every address in that range. Empty = not used.

## `houseNumber` (type: `integer`):

House number within `postcode`, e.g. 1. Only used with postcode. Empty = all numbers in the postcode.

## `houseNumberTo` (type: `integer`):

Last house number of a range starting at houseNumber, inclusive, e.g. 20 for 1-20. Needs postcode and houseNumber. Empty = only houseNumber.

## `houseNumberAddition` (type: `string`):

House letter and/or addition for a single houseNumber, e.g. "B" (5B), "1" (18-1), "H" (8-H), "A2" (1A-2). Empty = all units at that number (one row each).

## `bagIds` (type: `array`):

16-digit BAG identifiers: nummeraanduiding (address, e.g. "0363200012113669"), verblijfsobject (unit, "0363010012111931"), ligplaats/standplaats (berth/pitch) or pand (building, "0363100012185508": building details only, no address). Up to 100 together with addresses. Empty = not used.

## `include` (type: `array`):

Which sections to fill: any of "address" (street, postcode, city, municipality, province), "building" (construction year, use purposes, floor area, status, units in the building), "coordinates" (WGS84 + RD New), e.g. \["address", "coordinates"]. BAG ids are always returned. Default (or empty) = all three. Without "building" the run is faster; the price is the same.

## Actor input object example

```json
{
  "addresses": [
    "Damrak 1 Amsterdam",
    "Coolsingel 40, 3011AD Rotterdam"
  ],
  "include": [
    "address",
    "building",
    "coordinates"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "addresses": [
        "Damrak 1 Amsterdam",
        "Coolsingel 40, 3011AD Rotterdam"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bosco_labs/dutch-address-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "addresses": [
        "Damrak 1 Amsterdam",
        "Coolsingel 40, 3011AD Rotterdam",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bosco_labs/dutch-address-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "addresses": [
    "Damrak 1 Amsterdam",
    "Coolsingel 40, 3011AD Rotterdam"
  ]
}' |
apify call bosco_labs/dutch-address-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bosco_labs/dutch-address-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vjXwHZ4JTyQHKk6hr/builds/bWmpb41uiUkusgAvu/openapi.json
