# Netherlands KvK Open-Data Status Event Monitor (`plym-actor-factory/netherlands-kvk-status-event-monitor`) Actor

Watch a list of Dutch KVK numbers and emit typed active/insolvency status events from free official HVDS open data (BV/NV only). Not a Handelsregister dump. Not paid Basisprofiel or Mutatieservice.

- **URL**: https://apify.com/plym-actor-factory/netherlands-kvk-status-event-monitor.md
- **Developed by:** [Daniel Witney](https://apify.com/plym-actor-factory) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 kvk status event delivereds

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

## Netherlands KvK Open-Data Status Event Monitor

Watch a **list of Dutch KVK numbers** (suppliers, customers, counterparties) and receive **typed status / insolvency events** when free official **KvK Handelsregister Open Dataset (HVDS)** fields flip — **active→inactive**, new **FAIL / SURS / SSAN** insolvency codes, optional SBI activity changes. **Not** another Handelsregister directory scrape. **Not** paid Basisprofiel (€0.02/query) or Mutatieservice (€1,279/yr).

### Honest coverage (read before buying)

| Included (free HVDS, CC BY 4.0) | **Not** included |
|--------------------------------|------------------|
| BV and NV registrations only | Sole traders / other rechtsvormen |
| `actief` (J/N), `insolventieCode`, `rechtsvormCode`, postcode **region** (2 digits), SBI activities | Company **name**, directors, full address, employee count |
| Lookup by **8-digit KVK number** | Free RSIN→KVK resolution (RSIN is optional metadata only) |
| Working-day refresh | Intra-hour streaming; unpaid paid-register extracts |

Bulk ZIP download is **anonymised** (no `kvkNummer` column) — it cannot key a portfolio watchlist. This Actor uses the **official per-KVK HVDS API** only.

**Rate limits (official):** max **1 request / minute / IP**, plus a shared **200 requests / 5 minutes**. Default `requestPaceMs=60000`. Large books need longer `maxRunSeconds` or chunked schedules.

**Licence:** CC BY 4.0. Do **not** enrich HVDS to re-identify individuals.

### Value proposition

- **KVK watchlist × HVDS snapshot diff** → `KVK_DEACTIVATED`, `KVK_REACTIVATED`, `INSOLVENCY_FAIL`, `INSOLVENCY_SURS`, `INSOLVENCY_SSAN`, `INSOLVENCY_CLEARED`, optional `SBI_CHANGED`.
- Official free open data only. **No unpaid Basisprofiel / Mutatieservice.** Not kvk.nl HTML scrape.
- **Pay only for unique delivered change events.** First observation stores a baseline (no charge). Quiet days ≈ $0.
- Durable KVS checkpoint + `event_uid` dedupe.

### PRODUCTION USE (required for real monitoring)

> **Store default ≠ product.** Schema defaults use `sourceMode=fixture` so Apify Store daily auto-tests leave a non-empty health dataset **without** calling HVDS. That fixture path only writes a non-billable `RUN_STATUS` / `FIXTURE_HEALTH` row. It is **not** KvK monitoring.

For **production monitoring** you **must**:

1. Set **`sourceMode` = `live`**
2. Provide your `kvkNumbers` watchlist (BV/NV)
3. Schedule runs with fair-use pacing (`requestPaceMs` ≥ 60000 recommended)
4. Optionally set `hvdsAsOf` (YYYY-MM-DD) and `rsinByKvk` labels

Official references:

- [HVDS Basic Company Information API](https://developers.kvk.nl/documentation/open-dataset-basis-bedrijfsgegevens-api)
- [KvK open dataset product page](https://www.kvk.nl/en/ordering-products/kvk-business-register-open-data-set/) (CC BY 4.0)
- Endpoint: `https://opendata.kvk.nl/api/v1/hvds/basisbedrijfsgegevens/kvknummer/{kvkNummer}`

### Apify Store daily auto-test / default input

| Field | Default |
|-------|---------|
| `kvkNumbers` | `["12345678","87654321"]` |
| `signalGroups` | `status`, `insolvency`, `sbi` |
| `sourceMode` | `fixture` |
| `emitFixtureDemoEvents` | `false` |
| `maxRunSeconds` | `55` |
| `requestPaceMs` | `60000` |

On that path the Actor **SUCCEEDS** quickly, pushes exactly one `RUN_STATUS` / `FIXTURE_HEALTH` row (`billable: false`), and does **not** charge `kvk-status-event-delivered`.

### Input (summary)

| Field | Notes |
|-------|--------|
| `kvkNumbers` | Watchlist (required, 8 digits) |
| `rsinByKvk` | Optional KVK→RSIN labels (metadata) |
| `signalGroups` | `status`, `insolvency`, `sbi` |
| `sourceMode` | `fixture` (default) or `live` |
| `emitFixtureDemoEvents` | Default **false** |
| `hvdsAsOf` | Optional as\_of hint |
| `maxRunSeconds` / `maxEvents` | Budgets |
| `resumeFromCheckpoint` | Default true |
| `requestPaceMs` | Default **60000** (HVDS 1/min) |

#### Production example

```json
{
  "kvkNumbers": ["12345678", "87654321"],
  "signalGroups": ["status", "insolvency"],
  "sourceMode": "live",
  "hvdsAsOf": "2026-09-16",
  "maxRunSeconds": 600,
  "requestPaceMs": 60000,
  "resumeFromCheckpoint": true
}
```

### Output

#### Change events (billable under PPE)

Typed rows include: `kvk_number`, `rsin`, `event_type`, `event_subtype`, `changed_fields`, `previous_value`, `new_value`, `as_of`, `evidence`, `summary`, `source_url`, `event_uid`, `rechtsvorm_code`, `billable: true`.

#### RUN\_STATUS (never billed)

Every successful run pushes one health row (`FIXTURE_HEALTH` | `MONITOR_IDLE` | `CATCHUP_COMPLETE` | `HEALTH_OK`).

### Pricing

Pay-per-event: **`kvk-status-event-delivered`** at **$0.02** per delivered unique change event ($20 / 1,000). Single tier (see `docs/monetization.md` and ADR 0010). Health / baseline / duplicate / non-BV-NV / fixture rows are never charged.

### Local development

```bash
cd actors/netherlands-kvk-status-event-monitor
npm install
npm test
npm run build
apify run -p
```

### Attribution

Data originates from the **Kamer van Koophandel (KvK)** Handelsregister Open Dataset / HVDS under **CC BY 4.0**. Not an official KvK product. Not paid Basisprofiel or Mutatieservice.

# Actor input Schema

## `kvkNumbers` (type: `array`):

Dutch 8-digit KVK numbers to monitor. Free HVDS covers BV/NV only. Invalid entries are skipped with no charge. RSIN alone cannot be resolved via free HVDS — use kvkNumbers (optional rsinByKvk for labels).

## `rsinByKvk` (type: `object`):

Optional map of KVK → 9-digit RSIN for metadata on events. Free HVDS lookups are always by KVK number; RSIN is not a free open-data lookup key.

## `signalGroups` (type: `array`):

Which change groups to evaluate: status (actief), insolvency (FAIL/SURS/SSAN), sbi. Default: all.

## `maxRunSeconds` (type: `integer`):

Wall-clock budget. Official HVDS pace is ≤1 request/minute/IP — large books need long budgets or chunked schedules.

## `maxEvents` (type: `integer`):

Stop after this many unique change events are delivered (does not include RUN\_STATUS).

## `resumeFromCheckpoint` (type: `boolean`):

If true, resume KVK snapshots and seen event\_uids from the default Key-Value Store.

## `sourceMode` (type: `string`):

fixture = local/CI / Apify Store daily auto-test default (no network; emits RUN\_STATUS only unless emitFixtureDemoEvents=true). live = official free HVDS open-data API (BV/NV; ≤1 req/min/IP). Not paid Basisprofiel/Mutatieservice.

## `emitFixtureDemoEvents` (type: `boolean`):

When sourceMode=fixture, if true push fabricated change events from local fixtures (unit/local demos only). Default false so Store daily auto-tests never emit fake change events or charge kvk-status-event-delivered. Production: leave false and use sourceMode=live.

## `hvdsAsOf` (type: `string`):

Optional as\_of label for events / RUN\_STATUS (HVDS refreshes every working day). Does not download the anonymised bulk ZIP (bulk has no kvkNummer column).

## `maxTotalChargeUsd` (type: `number`):

Optional soft budget hint for delivered change events. Platform ACTOR\_MAX\_TOTAL\_CHARGE\_USD also applies when set.

## `requestPaceMs` (type: `integer`):

Minimum delay between outbound HVDS HTTP requests. Official limit: max 1 request per minute per IP (default 60000). Also respect shared 200 requests / 5 minutes.

## Actor input object example

```json
{
  "kvkNumbers": [
    "12345678",
    "87654321"
  ],
  "rsinByKvk": {},
  "signalGroups": [
    "status",
    "insolvency",
    "sbi"
  ],
  "maxRunSeconds": 55,
  "maxEvents": 500,
  "resumeFromCheckpoint": true,
  "sourceMode": "fixture",
  "emitFixtureDemoEvents": false,
  "requestPaceMs": 60000
}
```

# Actor output Schema

## `OUTPUT` (type: `string`):

JSON summary: delivered, charged, runStatus, checkpoint, stats, HVDS coverage limits

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("plym-actor-factory/netherlands-kvk-status-event-monitor").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("plym-actor-factory/netherlands-kvk-status-event-monitor").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 '{}' |
apify call plym-actor-factory/netherlands-kvk-status-event-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plym-actor-factory/netherlands-kvk-status-event-monitor"
        }
    }
}
```

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/xdSEmxr78mhzg4uyS/builds/VLZLxXdufg7OjFf6w/openapi.json
