{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openarchieven-nl/json-schema/openarchieven-nl-census-response-schema.json",
  "title": "CensusResponse",
  "description": "Census data for matched places plus optional provincial totals.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openarchieven-nl-openapi.yaml#/components/schemas/CensusResponse",
  "type": "object",
  "properties": {
    "census": {
      "type": "array",
      "description": "Up to 10 census records for matching places.",
      "items": {
        "type": "object",
        "properties": {
          "population": {
            "type": "integer",
            "description": "Total population count."
          },
          "gg_uri": {
            "type": "string",
            "format": "uri",
            "description": "Gemeentegeschiedenis URI for the municipality."
          },
          "name": {
            "type": "string",
            "description": "Place name."
          },
          "province": {
            "type": "string",
            "description": "Province name as recorded in the census."
          },
          "year": {
            "type": "integer",
            "description": "Actual census year used."
          },
          "table": {
            "type": "object",
            "description": "Key-value pairs of census data columns. Column keys are prefixed with their original column number (e.g. \"02 huizen\").\n",
            "additionalProperties": {
              "type": "integer"
            }
          }
        }
      }
    },
    "totals": {
      "type": "object",
      "description": "Aggregated population totals per province. Only present when `richness=3`.\n",
      "additionalProperties": {
        "type": "integer"
      }
    }
  }
}