Data · API

Public read-only API

Every published indicator, geography, packed value and resident profile section is available under /api/v1. There are no API keys, no writes and no per-point or raw 311 records.

Browse the same data interactively in the indicator catalogue. The source register is on Sources and downloads.

Base URL and methods

All endpoints are GET; HEAD follows the GET response without a body. POST, PUT, PATCH, DELETE and OPTIONS return 405 method_not_allowed with Allow: GET. Responses carry Access-Control-Allow-Origin: *; there are no credentials, so a simple GET needs no preflight. Do not send cookies or authorization headers.

Every response is JSON except export.csv, which is text/csv; charset=utf-8 with Content-Disposition: attachment.

Caching and freshness

Successful responses send these headers:

Cache-Control: public, max-age=300, s-maxage=3600
CDN-Cache-Control: public, max-age=3600

Browsers may reuse a response for 5 minutes; shared caches may reuse it for up to 1 hour. Errors and 405 responses send Cache-Control: no-store instead. These are response headers, not a promise that a particular browser, CDN or other intermediary has cached or evicted a copy. After a data reload, an intermediary cache can serve the previous response until its freshness window expires; v1 has no purge endpoint and makes no claim of global edge eviction.

Endpoints

EndpointParametersReturns
GET /api/v1/indicatorstopic, q, level (all optional)Indicator metadata, topics, levels, sources and level → period availability.
GET /api/v1/geographieslevel (optional)The registered areas and per-level counts. Without a level, the full registry.
GET /api/v1/valuesindicator, level, period (required); geoId (optional)One exact pack with every registered area’s value, status and own denominator.
GET /api/v1/profile/:geoIdPath parameter onlyOne area’s resident profile sections, values, statuses and sources.
GET /api/v1/export.csvSame as valuesThe same rows as CSV, with the filter’s filename.

Indicators

q is a case-insensitive substring search over the indicator id, label, plain label, descriptions and universe (1–120 characters). level restricts both the returned indicators and each indicator’s availability to that level. topic must be one of the published topics.

availability maps level → period → the number of non-null values in that pack. A zero means the pack is published but blank; request it and every row will be null with its status. A period is never silently swapped for another one.

GET /api/v1/indicators?level=municipality&q=population%3Acensus

{
  "apiVersion": "v1",
  "count": 1,
  "topics": [{ "id": "population", "label": "Population", "count": 1 }],
  "levels": [{
    "id": "municipality",
    "label": "GTA municipality",
    "short": "GTA municipalities",
    "description": "The 25 lower- and single-tier municipalities ...",
    "sortOrder": 3,
    "count": 1
  }],
  "sources": [{
    "id": "v0-17",
    "title": "...",
    "publisher": "Statistics Canada",
    "url": "https://...",
    "licence": "...",
    "releaseDate": null,
    "retrievedAt": "2026-10-21T15:20:08Z",
    "sha256": null
  }],
  "indicators": [{
    "id": "population:census",
    "label": "Census population count",
    "plainLabel": "Population (census)",
    "descriptionPlain": "The number of people counted here on census day.",
    "descriptionTechnical": "Total population counts, 2016 and 2021 Census (table 98-10-0003-01).",
    "topic": "population",
    "kind": "count",
    "unit": "persons",
    "universe": "Total population (census count)",
    "denominatorIndicatorId": null,
    "summable": true,
    "comparabilityGroup": "population",
    "sourceId": "v0-17",
    "availability": {
      "municipality": { "2016": 25, "2016-2021": 25, "2021": 25 }
    }
  }]
}

Abridged: the live response includes every topic, level and source row, and all matching indicators. The topics are Population, Age and gender, Households, Housing, Housing and development (City records), Safety (police and fire reports), Services (City records), Income, Education, Work, Commuting, Immigration, Place of birth, Ethnic or cultural origin, Visible minority, Religion, Language. The levels are Country, Province, Census metropolitan area, GTA region, GTA municipality, First Nation reserve, Toronto ward, Toronto Community Council Area, Toronto neighbourhood (158 model), Toronto neighbourhood (140 model), Census tract (2021), Census tract (2016).

Geographies

Without level, the response is the full registry (about 3,000 areas including census tracts). Use level to bound it. A centroid is included only when both coordinates exist. note carries boundary transfers, not_tracted reasons and data-quality flags.

GET /api/v1/geographies?level=ward

{
  "apiVersion": "v1",
  "count": 25,
  "levels": [{ "id": "ward", "label": "Toronto ward", "short": "Toronto wards", "description": "...", "sortOrder": 5, "count": 25 }],
  "geographies": [{
    "id": "ward:1",
    "level": "ward",
    "code": "1",
    "name": "Etobicoke North",
    "parentId": "council_area:etobicoke-york",
    "vintage": "2018",
    "centroid": { "lon": -79.58467, "lat": 43.71941 },
    "note": null
  }]
}

Abridged: the live response includes all 25 wards and the counts for every level.

Values

All three of indicator, level and period are required. The API looks up that exact pack; it never substitutes a different period or level. A malformed id is 400, an unknown indicator or a missing pack is 404 with the available levels and periods in details.

Rows cover every registered geography at the level, including areas with no cell in the pack; those have value: null and status: "no_data". Pass geoId to return one area. A null value always carries a status, and a zero is a real zero. denominator is the indicator’s own denominator pack at the same level and period; it is null for a change pack and when the indicator has no denominator.sourceIds/sources come from the pack’s own provenance; sourceProvenance: "indicator" is used only when the pack carries no sources.

GET /api/v1/values?indicator=population%3Acensus&level=municipality&period=2021&geoId=municipality%3Atoronto

{
  "apiVersion": "v1",
  "indicator": {
    "id": "population:census",
    "label": "Census population count",
    "plainLabel": "Population (census)",
    "descriptionPlain": "The number of people counted here on census day.",
    "descriptionTechnical": "...",
    "topic": "population",
    "kind": "count",
    "unit": "persons",
    "universe": "Total population (census count)",
    "denominatorIndicatorId": null,
    "summable": true,
    "comparabilityGroup": "population",
    "sourceId": "v0-17",
    "availability": { "municipality": { "2016": 25, "2016-2021": 25, "2021": 25 } }
  },
  "level": "municipality",
  "levelLabel": "GTA municipality",
  "period": "2021",
  "changeMeasure": null,
  "unit": "persons",
  "universe": "Total population (census count)",
  "kind": "count",
  "summable": true,
  "denominator": null,
  "sourceIds": ["statcan-2021-profile-csd-da-ontario", "v0-17"],
  "sourceProvenance": "pack",
  "sources": [{ "id": "statcan-2021-profile-csd-da-ontario", "title": "...", "publisher": "Statistics Canada", "url": "https://...", "licence": "...", "releaseDate": null, "retrievedAt": "2026-10-21T15:20:08Z", "sha256": "..." }],
  "coverage": { "torontoOnly": false, "label": null, "note": null },
  "valueCount": 25,
  "rowCount": 1,
  "rows": [{
    "geoId": "municipality:toronto",
    "name": "Toronto",
    "parentId": "region:toronto",
    "value": 2794356,
    "status": "ok",
    "denominator": null,
    "denominatorStatus": null,
    "coverage": null
  }]
}

Abridged: the live indicator.availability and sources arrays include every available level/period and both pack sources.

A change period (for example period=2016-2021) returns the precomputed change pack. changeMeasure is "percent" or "points". denominator is null. A rate or median is never added; summable: false marks indicators that must not be totalled: overlapping categories, rates, medians and other non-count measures.

Profile

profile/:geoId returns one area’s resident profile sections from profile_packs: people, housing, economy, origins and language. Both census-tract levels (census_tract_2016 and census_tract_2021) instead use a single all section per period. This is the same resident-profile scope, not an additional data scope. It does not contain safety, admissions, 311, service or projection series, and it never joins resident composition to a safety layer. An unknown geography is 404; a known area with no profile packs returns an empty sections array.

GET /api/v1/profile/municipality%3Atoronto

{
  "apiVersion": "v1",
  "profileScope": "resident",
  "area": {
    "id": "municipality:toronto",
    "level": "municipality",
    "code": "2021A00053520005",
    "name": "Toronto",
    "parentId": "region:toronto",
    "vintage": "2021",
    "centroid": { "lon": -79.39053, "lat": 43.72711 },
    "note": "Single-tier municipality"
  },
  "parent": { "id": "region:toronto", "level": "region", "code": "2021A00033520", "name": "City of Toronto", "parentId": null, "vintage": "2021", "centroid": { "lon": -79.39055, "lat": 43.72712 }, "note": "Census division 3520." },
  "sections": [{
    "period": "2016",
    "topic": "economy",
    "sourceIds": ["statcan-2016-profile-csd-da-ontario"],
    "sourceProvenance": "pack",
    "sources": [{ "id": "statcan-2016-profile-csd-da-ontario", "title": "...", "publisher": "Statistics Canada", "url": "https://...", "licence": "Statistics Canada Open Licence", "releaseDate": null, "retrievedAt": "2026-10-21T15:20:08Z", "sha256": "..." }],
    "valueCount": 27,
    "values": [
      { "indicatorId": "commute:Bicycle", "value": 34355, "status": "ok" },
      { "indicatorId": "commute:Other method", "value": 13605, "status": "ok" }
    ]
  }],
  "indicators": [{
    "id": "commute:Bicycle",
    "label": "Main way to get to work: bicycle",
    "plainLabel": "Bike",
    "descriptionPlain": "...",
    "descriptionTechnical": "...",
    "topic": "commute",
    "kind": "count",
    "unit": "persons",
    "universe": "Employed labour force aged 15 and over ...",
    "denominatorIndicatorId": "commute:total",
    "summable": true,
    "comparabilityGroup": "commute",
    "sourceId": "statcan-2021-profile-csd-da-ontario"
  }]
}

Abridged: the live profile contains every resident section and period (at most 20 rows) and every indicator used by those sections.

CSV export

export.csv takes the same parameters as values and writes the same rows. Columns:

indicator_id,level,period,geo_id,name,parent,value,status,denominator,denominator_status,unit,universe,change_measure,coverage,source_id

Missing values are empty cells, not zeros; status explains them. change_measure is empty for a value pack and percent or points for a change pack. The filename is derived from the indicator, level and period, for example population_census-municipality-2021.csv. The server sends Content-Disposition: attachment and exposes that header to browser downloads.

GET /api/v1/export.csv?indicator=population%3Acensus&level=municipality&period=2021&geoId=municipality%3Atoronto

indicator_id,level,period,geo_id,name,parent,value,status,denominator,denominator_status,unit,universe,change_measure,coverage,source_id
population:census,municipality,2021,municipality:toronto,Toronto,region:toronto,2794356,ok,,,persons,Total population (census count),,,statcan-2021-profile-csd-da-ontario;v0-17

Statuses and missing values

ok means a published value. suppressed, not_available, not_applicable and not_comparable explain a missing value; rounded marks a publisher-rounded value. no_data is API-only: the geography is registered at the level but has no cell in this pack. A missing value is always null, never zero.

Errors

StatusWhen
400Missing, empty, repeated or unknown query parameter; invalid indicator, level, period or geography id; a geography that belongs to another level; an unknown topic.
404Unknown indicator or geography, or no pack for that exact indicator/level/period.
405Any method other than GET, with Allow: GET.
500An unexpected server failure. The message is generic; the details are not exposed.
{
  "apiVersion": "v1",
  "error": {
    "code": "pack_not_found",
    "message": "No published pack for \"population:census\" at ward / 2021.",
    "details": {
      "indicatorId": "population:census",
      "level": "ward",
      "period": "2021",
      "availableLevels": ["cma", "census_tract_2016", "census_tract_2021", "country", "first_nation_reserve", "municipality", "region"],
      "availablePeriods": []
    }
  }
}

Data rules the API keeps