# Chain Location Network Monitor (Overture Places) (`codeclouds/vestigingennetwerk-monitor`) Actor

Compare chain/brand locations in a small area between two Overture Places releases or a saved baseline: newly observed, no-longer-observed, changed and uncertain records as source observations.

- **URL**: https://apify.com/codeclouds/vestigingennetwerk-monitor.md
- **Developed by:** [Dennis](https://apify.com/codeclouds) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 chain network changes

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

### Chain location network events

Compare observed chain/brand locations between an older and newer Overture Places release (or against a saved baseline) within a selected area. Reports newly observed, no-longer-observed, changed and uncertain-match records — source observations only, not confirmed business events.

### When should an AI agent use this?

- "Compare observed Starbucks, Albert Heijn and Jumbo locations in an Amsterdam area between the Overture releases 2026-07-22.0 and 2026-08-19.0."
- "Record a location baseline for the brand list \["Albert Heijn"] in bounding box \[4.88, 52.36, 4.91, 52.38], without comparing releases."
- "Which chain records changed between these two pinned releases: which IDs are shared but have different categories, addresses, confidence or bbox?"
- "Identify records where `brand` is null but the name contains the brand text, flagged as uncertain matches."

### Input

- `brands`: string array of tracked chain/brand names (also matched against the record's `names.primary`).
- `bbox`: WGS84 bounding box for the observed area; only intersecting rows are decoded.
- `releaseCurrent`: pinned Overture release (e.g. `2026-08-19.0`).
- `releasePrevious`: optional second release for comparison; if omitted with `trackChanges`, compares against the saved snapshot for this config.
- `matchMode`: `brandField` (strict, requires the `brand.names.primary` field) or `brandOrName` (default, allows name matches but marks them as less certain).
- `minConfidence`: excludes low-confidence records.
- `categoriesBlock`: excludes records whose primary/basic category is in this list (e.g. `casino`, `transportation`).
- `maxBytesPerRelease`: per-release download budget cap; extraction stops and reports incomplete without emitting false disappearance events.

### Output (dataset schema)

- `recordType`: `summary` / `location` / `change`
- Change records (`changeType`): `newly_observed`, `no_longer_observed`, `changed`, `uncertain_match`, `first_observation`
- Per-change fields: event `id`, current and previous names/coordinates/addresses/confidence/status, changed-fields list, release pair, source licenses
- Per-location fields: brand, name, category, bbox, confidence, operating status (nullable), source licenses
- `summary`: observed counts, event counts, extraction completeness (`complete`), bytes fetched, config hash (`configHash`), explicit warnings

### Fixture evidence

The fixtures `release-juli.json` (56 records) and `release-augustus.json` (55 records) are included in `tests/fixtures/` and used by the unit tests. They cover: substring false positives (`Albert Heijn Spelen` casino), category mismatches (`transportation` record with Starbucks brand), address/coordinate changes, shared IDs (53), additions (2) and removals (2), plus explicit source-license provenance per contributor (`CDLA-Permissive-2.0`, `CC0-1.0`, `Apache-2.0`).

This evidence supports the claim that the actor reports source-level observations reliably. It does NOT establish that any new/removed/changed record equals a real-world opening/closure/relocation; the MVP scope explicitly avoids that claim.

### Pricing (suggested, not set)

- `location-snapshot`: cheap per observed location (low enrichment).
- `network-change`: priced higher for `newly_observed` / `no_longer_observed` / `changed` events, lower for `snapshot` / `first_observation`. No pricing is set in this local build; set via `STOREINFO.md` before any `apify push`.

### Technical

- Pure matching (`brands.ts`), defensive mapping (`places.ts`), network diff (`network.ts`), config isolation (`config.ts`), bounded reading (`overture.ts`).
- Named key-value store per actor (`vestigingennetwerk-monitor-snapshots`) for cross-run history; deterministic event IDs and replay idempotence are required.
- `maxBytesPerRelease`: hard budget cap; extraction aborts cleanly on over-cap, timeout or unexpected range response.
- Source releases: `2026-07-22.0` and `2026-08-19.0`; schema documented `v1.18.0`; retention is about two releases / 60 days (see `docs/databronnen/overture-places-parquet.md`).
- No personal profiles; only public company/chain location observations.
- Legal: source records carry per-source licenses (`sources[].license`). Preserve them in output; do not claim a single universal license.
- Build: `npm run build` + `npm test` pass locally; `npm run typecheck` and workspace `test` must also pass before any publish (`PUBLISHING_INFO.txt` and build checklists document this).

### Related Actors

- `nl-poi-finder-cbs-buurtverrijking` — existing POI/CBS actor, complementary for broader POI context.
- The `nl-studentenwoonruimte-monitor` snapshot-change-detection pattern (pure comparison, budget-aware delivery, named KV snapshot, idempotent replay) is reused; this actor differs by comparing external fixed releases rather than scraping a live site.

### Changelog

- `2026-09-17` — MVP scope written, source validated (two releases, 55/56 fixtures, bounded query ~33/28 MB per release, 21 usable chain-candidates after noise filters), actor scaffolded (`vestigingennetwerk-monitor`). Not published.

# Actor input Schema

## `brands` (type: `array`):

Brand names to track. Matching uses brand.names.primary and the record name (see matchMode). Add spelling variants per brand as separate alias entries — e.g. "Albert Heijn" plus "AH to go". Keep the list small; each brand adds matching work.

## `bbox` (type: `object`):

Area to observe, in WGS84 degrees: { "west": 4.88, "south": 52.36, "east": 4.91, "north": 52.38 }. Keep it small (a city district): extraction cost grows quickly with area and the source has no country partition. Returns records whose coordinates fall inside (west..east, south..north).

## `releaseCurrent` (type: `string`):

Overture Maps release ID of the observation to analyze, e.g. "2026-08-19.0". Only about two monthly releases are kept upstream; pin the release explicitly so repeated runs compare the same data. Must be newer than releasePrevious.

## `releasePrevious` (type: `string`):

Optional second Overture release ID (e.g. "2026-07-22.0") to compare against the current one. Leave empty to record a baseline run: locations are stored as first observation, no change events are produced, and the next run can compare against this baseline. Must be older than releaseCurrent and, like it, still hosted by Overture (about two releases are retained).

## `matchMode` (type: `string`):

How a record is attributed to a brand. "brandField" uses only the Overture brand field (strict, misses records where brand is empty). "brandOrName" also matches the location name — more sensitive, but a name containing the brand text is not always a location of that chain, so check matchEvidence in the output.

## `minConfidence` (type: `number`):

Exclude records whose Overture confidence is below this value (0–1). The source mixes low-confidence records from many providers; the default filters obvious noise but is not a guarantee.

## `categoriesBlock` (type: `array`):

Exclude records whose primary Overture category is in this list — used to drop obvious non-store matches (e.g. "casino", "transportation"). Applied to the primary category only.

## `trackChanges` (type: `boolean`):

If true and no releasePrevious is given, compare against the baseline saved by an earlier run (named key-value store, per brand-area configuration). A scheduled run with this option keeps the network history alive. With releasePrevious set, that explicit pair of releases is compared and the baseline store is only refreshed, never used for events. With no baseline yet, this run records one (all records reported as first observation, no change events).

## `maxBytesPerRelease` (type: `integer`):

Hard cap on total HTTP bytes fetched per release, including metadata. The probe for a small city-district area needed ~33 MB; a larger area needs more row groups. The run aborts (without writing a baseline or disappearance events) when the cap is exceeded.

## Actor input object example

```json
{
  "brands": [
    "Albert Heijn",
    "AH to go"
  ],
  "bbox": {
    "west": 4.88,
    "south": 52.36,
    "east": 4.91,
    "north": 52.38
  },
  "releaseCurrent": "2026-08-19.0",
  "matchMode": "brandOrName",
  "minConfidence": 0.3,
  "categoriesBlock": [
    "casino",
    "transportation"
  ],
  "trackChanges": false,
  "maxBytesPerRelease": 160
}
```

# Actor output Schema

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

Location and change records stored in the default dataset.

# 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 = {
    "brands": [
        "Albert Heijn",
        "AH to go"
    ],
    "bbox": {
        "west": 4.88,
        "south": 52.36,
        "east": 4.91,
        "north": 52.38
    },
    "releaseCurrent": "2026-08-19.0",
    "categoriesBlock": [
        "casino",
        "transportation"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codeclouds/vestigingennetwerk-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 = {
    "brands": [
        "Albert Heijn",
        "AH to go",
    ],
    "bbox": {
        "west": 4.88,
        "south": 52.36,
        "east": 4.91,
        "north": 52.38,
    },
    "releaseCurrent": "2026-08-19.0",
    "categoriesBlock": [
        "casino",
        "transportation",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("codeclouds/vestigingennetwerk-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 '{
  "brands": [
    "Albert Heijn",
    "AH to go"
  ],
  "bbox": {
    "west": 4.88,
    "south": 52.36,
    "east": 4.91,
    "north": 52.38
  },
  "releaseCurrent": "2026-08-19.0",
  "categoriesBlock": [
    "casino",
    "transportation"
  ]
}' |
apify call codeclouds/vestigingennetwerk-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codeclouds/vestigingennetwerk-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/0kA90qeS1tOxXQp5T/builds/Blw0bgAJ6jHPJoqCl/openapi.json
