{"openapi":"3.1.0","info":{"title":"City Memory API","version":"1.0.0","summary":"Reference data for all 565 Belgian municipalities.","description":"A free, public, read-only API. Every endpoint is a static file on a CDN, so there are no keys, no quotas and no rate limits — but also no query parameters: filter the collections client-side, or fetch the province or region file you need.\n\nData is an OpenStreetMap extract of 2026-09-20T11:49:36Z, under ODbL. If you redistribute the data you must attribute OpenStreetMap contributors.","license":{"name":"Open Database License (ODbL) v1.0","url":"https://opendatacommons.org/licenses/odbl/1-0/"},"contact":{"name":"City Memory","url":"https://city-memory.pages.dev/about"}},"servers":[{"url":"https://city-memory.pages.dev/api/v1","description":"Production"}],"paths":{"/municipalities.json":{"get":{"summary":"Every municipality, without geometry","description":"All 565 in one response, with names, codes, centroid, bbox and area but no boundary. About 250 kB. Fetch this once and filter it locally.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"municipalities":{"type":"array","items":{"type":"object","properties":{"nis":{"type":"string","description":"The five-digit Belgian NIS/INS code. The stable key for a municipality.","example":"11001"},"name":{"type":"string","description":"The official name as the municipality itself writes it."},"names":{"type":"object","properties":{"nl":{"type":"string"},"fr":{"type":"string"},"de":{"type":"string"}}},"officialLanguage":{"type":"string","enum":["nl","fr","de","both"]},"province":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"centroid":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"[longitude, latitude] in WGS84 (EPSG:4326)."},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"[west, south, east, north] in WGS84."},"areaKm2":{"type":"number","description":"Surface area in square kilometres, from the spherical excess of the boundary."},"parts":{"type":"integer","description":"How many disjoint polygons the municipality is made of. Baarle-Hertog has 26."},"neighbourCount":{"type":"integer","description":"How many other Belgian municipalities share a border with this one."},"osm":{"type":"object","properties":{"relation":{"type":"string","description":"The OpenStreetMap relation, e.g. relation/58545."},"wikidata":{"type":"string","description":"The Wikidata Q-id, if OSM records one."}}}},"required":["nis","name","names","province","region","centroid","bbox","areaKm2"]}}}}}}},"404":{"description":"No such resource."}}}},"/municipalities/{nis}.json":{"get":{"summary":"One municipality, with its boundary","description":"A GeoJSON Feature: the summary fields under `properties`, and the boundary under `geometry` at roughly 10 m fidelity.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","example":"Feature"},"properties":{"type":"object","properties":{"nis":{"type":"string","description":"The five-digit Belgian NIS/INS code. The stable key for a municipality.","example":"11001"},"name":{"type":"string","description":"The official name as the municipality itself writes it."},"names":{"type":"object","properties":{"nl":{"type":"string"},"fr":{"type":"string"},"de":{"type":"string"}}},"officialLanguage":{"type":"string","enum":["nl","fr","de","both"]},"province":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"centroid":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"[longitude, latitude] in WGS84 (EPSG:4326)."},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"[west, south, east, north] in WGS84."},"areaKm2":{"type":"number","description":"Surface area in square kilometres, from the spherical excess of the boundary."},"parts":{"type":"integer","description":"How many disjoint polygons the municipality is made of. Baarle-Hertog has 26."},"neighbourCount":{"type":"integer","description":"How many other Belgian municipalities share a border with this one."},"osm":{"type":"object","properties":{"relation":{"type":"string","description":"The OpenStreetMap relation, e.g. relation/58545."},"wikidata":{"type":"string","description":"The Wikidata Q-id, if OSM records one."}}},"neighbours":{"type":"array","description":"Every municipality sharing a border with this one.","items":{"type":"object","properties":{"nis":{"type":"string"},"name":{"type":"string"}}}}}},"geometry":{"type":"object","properties":{"type":{"type":"string"},"coordinates":{}}}}}}}},"404":{"description":"No such resource."}},"parameters":[{"name":"nis","in":"path","required":true,"description":"Five-digit NIS code.","schema":{"type":"string","pattern":"^\\d{5}$","example":"11001"}}]}},"/provinces.json":{"get":{"summary":"The eleven provinces","description":"Brussels is counted as a province here, as the game does.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"provinces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"municipalityCount":{"type":"integer"}}}}}}}}},"404":{"description":"No such resource."}}}},"/provinces/{id}.json":{"get":{"summary":"One province and all its municipalities","description":"Includes the full summary of every municipality in it.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"municipalities":{"type":"array","items":{"type":"object","properties":{"nis":{"type":"string","description":"The five-digit Belgian NIS/INS code. The stable key for a municipality.","example":"11001"},"name":{"type":"string","description":"The official name as the municipality itself writes it."},"names":{"type":"object","properties":{"nl":{"type":"string"},"fr":{"type":"string"},"de":{"type":"string"}}},"officialLanguage":{"type":"string","enum":["nl","fr","de","both"]},"province":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"centroid":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"[longitude, latitude] in WGS84 (EPSG:4326)."},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"[west, south, east, north] in WGS84."},"areaKm2":{"type":"number","description":"Surface area in square kilometres, from the spherical excess of the boundary."},"parts":{"type":"integer","description":"How many disjoint polygons the municipality is made of. Baarle-Hertog has 26."},"neighbourCount":{"type":"integer","description":"How many other Belgian municipalities share a border with this one."},"osm":{"type":"object","properties":{"relation":{"type":"string","description":"The OpenStreetMap relation, e.g. relation/58545."},"wikidata":{"type":"string","description":"The Wikidata Q-id, if OSM records one."}}}},"required":["nis","name","names","province","region","centroid","bbox","areaKm2"]}}}}}}},"404":{"description":"No such resource."}},"parameters":[{"name":"id","in":"path","required":true,"description":"Province id, e.g. antwerpen, hainaut, west-vlaanderen.","schema":{"type":"string","example":"antwerpen"}}]}},"/regions.json":{"get":{"summary":"The three regions","description":"Flanders, Wallonia and Brussels-Capital.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"regions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}},"404":{"description":"No such resource."}}}},"/regions/{id}.json":{"get":{"summary":"One region and all its municipalities","description":"","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"municipalities":{"type":"array","items":{"type":"object","properties":{"nis":{"type":"string","description":"The five-digit Belgian NIS/INS code. The stable key for a municipality.","example":"11001"},"name":{"type":"string","description":"The official name as the municipality itself writes it."},"names":{"type":"object","properties":{"nl":{"type":"string"},"fr":{"type":"string"},"de":{"type":"string"}}},"officialLanguage":{"type":"string","enum":["nl","fr","de","both"]},"province":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"region":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"centroid":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"[longitude, latitude] in WGS84 (EPSG:4326)."},"bbox":{"type":"array","items":{"type":"number"},"minItems":4,"maxItems":4,"description":"[west, south, east, north] in WGS84."},"areaKm2":{"type":"number","description":"Surface area in square kilometres, from the spherical excess of the boundary."},"parts":{"type":"integer","description":"How many disjoint polygons the municipality is made of. Baarle-Hertog has 26."},"neighbourCount":{"type":"integer","description":"How many other Belgian municipalities share a border with this one."},"osm":{"type":"object","properties":{"relation":{"type":"string","description":"The OpenStreetMap relation, e.g. relation/58545."},"wikidata":{"type":"string","description":"The Wikidata Q-id, if OSM records one."}}}},"required":["nis","name","names","province","region","centroid","bbox","areaKm2"]}}}}}}},"404":{"description":"No such resource."}},"parameters":[{"name":"id","in":"path","required":true,"description":"Region id: flanders, wallonia or brussels.","schema":{"type":"string","example":"flanders"}}]}},"/search.json":{"get":{"summary":"A name index for autocomplete","description":"Every name in all three languages, lowercased and accent-folded, so a client can match user input without normalising anything itself.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"nis":{"type":"string"},"name":{"type":"string"},"terms":{"type":"array","items":{"type":"string"}}}}}}}}}},"404":{"description":"No such resource."}}}},"/geo/belgium.geojson":{"get":{"summary":"All 565 boundaries as one FeatureCollection","description":"Simplified hard enough to send in one response. Use the province files when you need detail.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","example":"FeatureCollection"},"features":{"type":"array","items":{"type":"object","properties":{}}}}}}}},"404":{"description":"No such resource."}}}},"/geo/provinces/{id}.geojson":{"get":{"summary":"One province's boundaries as a FeatureCollection","description":"Simplified about forty times less than the national file.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","example":"FeatureCollection"}}}}}},"404":{"description":"No such resource."}},"parameters":[{"name":"id","in":"path","required":true,"description":"Province id.","schema":{"type":"string","example":"antwerpen"}}]}},"/geo/regions/{id}.geojson":{"get":{"summary":"One region's boundaries as a FeatureCollection","description":"","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","example":"FeatureCollection"}}}}}},"404":{"description":"No such resource."}},"parameters":[{"name":"id","in":"path","required":true,"description":"Region id.","schema":{"type":"string","example":"flanders"}}]}}}}