← Agent Data Hub · Search endpoints · /llms.txt

Canada Census 2021 Housing by Municipality — Core Housing Need, Affordability, Owners and Renters (Statistics Canada)

Share of households in core housing need and in unaffordable housing (2016 and 2021) and the number of owner and renter households (2021), for Canada, every province and territory and the 737 municipalities with 5,000 or more people, from Statistics Canada tables 98-10-0259-01 and 98-10-0240-01. Options for series: region: 1001409, 1001485, 1001504, 1001509, 1001517, 1001519, 1001542, 1002024, 1004019, 1005018, 1006009, 1006017, 1007013, 1010025, 1010032, 1101045, 1102075, 1102080, 1102085, 1103025 … and 731 more (Canada, a province or territory code (ON, BC …) or a municipality (census subdivision) by name or 7-digit code, e.g. Toronto, Langley, BC or 5915002); measure: core-housing-need-pct, unaffordable-pct, owner-households, renter-households.

Call it (no API key)

GET https://api.agentdatahub.de/api/v1/call/canada-census-housing-by-municipality?region=CA&measure=core-housing-need-pct&compact=1

Full metadata: verbose=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"canada-census-housing-by-municipality"}

How to fetch it

curl:

curl -s 'https://api.agentdatahub.de/api/v1/call/canada-census-housing-by-municipality?region=CA&measure=core-housing-need-pct&compact=1'

Python (standard library only):

import json, urllib.request

url = "https://api.agentdatahub.de/api/v1/call/canada-census-housing-by-municipality?region=CA&measure=core-housing-need-pct&compact=1"
with urllib.request.urlopen(url, timeout=30) as r:
    data = json.load(r)
print(json.dumps(data, indent=2)[:2000])

Google Sheets:

This endpoint answers in JSON. Any recorded series loads as a table with =IMPORTDATA("https://api.agentdatahub.de/api/v1/series/<id>?format=csv") (Excel: Data → From Web); find ids with /api/v1/series?q=….

Parameters

regionCanada, a province or territory code (ON, BC …) or a municipality (census subdivision) by name or 7-digit code, e.g. Toronto, Langley, BC or 5915002 (required; several comma-separated to compare, up to 10 series): 1001409, 1001485, 1001504, 1001509, 1001517, 1001519, 1001542, 1002024, 1004019, 1005018, 1006009, 1006017, 1007013, 1010025, 1010032, 1101045, 1102075, 1102080, 1102085, 1103025 … and 731 more (Canada, a province or territory code (ON, BC …) or a municipality (census subdivision) by name or 7-digit code, e.g. Toronto, Langley, BC or 5915002)
measureHousing measure (required; several comma-separated to compare, up to 10 series): core-housing-need-pct, unaffordable-pct, owner-households, renter-households
seriesOptional full series key as returned by /ask (instead of the parameters above), comma-separated for several
fromOptional start YYYY, YYYY-MM or YYYY-MM-DD
toOptional end YYYY, YYYY-MM or YYYY-MM-DD
lastNumber of most recent periods when no from/to is given, 1-500 (default: 13)

Example response (live, compact)

{
  "apiId": "canada-census-housing-by-municipality",
  "trust": "checked",
  "data_freshness": "live",
  "data": {
    "region": "CA",
    "measure": "core-housing-need-pct",
    "series": "Canada — households in core housing need (2016 and 2021)",
    "unit": "% of households",
    "frequency": "A",
    "latest": {
      "period": "2021",
      "value": 10.1
    },
    "history": [
      {
        "period": "2016",
        "value": 12.7
      },
      {
        "period": "2021",
        "value": 10.1
      }
    ],
    "available": {
      "from": "2016",
      "to": "2021",
      "points": 2
    },
    "verification": {
      "checked_at": "2026-11-26T21:53:22.613Z",
      "checks": [
        {
          "period": "2021",
          "field": "value",
          "expected": 10.1,
          "ok": true,
          "evidence": "Statistics Canada table 98-10-0259-01 (table viewer, www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=9810025901), read 2026-11-19: Canada, census year 2021, total tenure: percent of households in core housing need 10.1"
        }
      ]
    },
    "source": {
      "publisher": "Statistics Canada",
      "licence": "Statistics Canada Open Licence",
      "licence_url": "https://www.statcan.gc.ca/en/terms-conditions/open-licence",
      "source_url": "https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=9810025901",
      "source_url_level": "dataset",
      "series_title": "Canada;2021;Percent of households in core housing need;Total - Tenure"
    },
    "attribution": "Source: Statistics Canada (Open Licence). Not an endorsement by Statistics Canada."
  },
  "source": "Statistics Canada",
  "source_url": "https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=9810025901",
  "license": "Statistics Canada Open Licence",
  "licence_status": "green",
  "as_of": "2021",
  "checked": "2026-11-26"
}

Source & license

SourceStatistics Canada
LicenseStatistics Canada Open Licence
Source URLhttps://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=9810025901
Termshttps://www.statcan.gc.ca/en/terms-conditions/open-licence
CategoryOfficial National Statistics (US, UK, Canada, Australia) › Canada Census 2021 by municipality (Statistics Canada) · more: canada-census-location-of-study-by-municipality · canada-census-mother-tongue-by-municipality · canada-census-population-by-municipality