CensusMapper Census Data
censusmapper.census.get_dataFetch Canadian census values for selected regions and vectors, aggregated by province, CMA, census division, subdivision, tract, or dissemination area.
Instructions
Fetch Canadian census values (Statistics Canada) for chosen regions and census vectors, aggregated at a geographic level (province, CMA, census division, subdivision, tract, dissemination area). Returns one row per geography with a column per vector plus population, dwellings and area. Source: Statistics Canada Census; quota 500 region ids/day.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | Yes | Geographic aggregation level of the returned rows: Regions (the listed regions themselves), PR, CMA, CD, CSD, CT, DA or DB | |
| dataset | Yes | Census dataset id from censusmapper.list_datasets (e.g. "CA21", "CA16", "CA11") | |
| regions | Yes | Census regions to query, keyed by level with arrays of region ids (e.g. {"CMA":["35535"]} for Toronto, {"PR":["35"]} for Ontario) | |
| vectors | Yes | Census vector ids to return (e.g. ["v_CA21_1","v_CA21_6"] = population 2021, 2016) | |
| max_rows | No | Maximum number of rows to return (1-1000, default 200) | |
| geo_hierarchy | No | Include the parent geography hierarchy columns in each row (default false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |