@varve/cmhc-api
TypeScript client for CMHC Housing Market Information Portal table exports, filter discovery, and normalized observation rows.
CMHC's Housing Market Information Portal publishes Canadian housing data including starts, completions, under construction, vacancy, availability, rent, and rental universe tables. @varve/cmhc-api wraps the portal export flow in a typed TypeScript client with normalized, Zod-validated rows.
When to use this package
Use @varve/cmhc-api when CMHC HMIP is the source of truth for a housing metric and you need a repeatable programmatic export.
It is a good fit for:
- rental market data
- housing starts and completions
- table-driven export workflows
- normalized CSV rows for analysis
- planner flows that already know the CMHC table ID
Data model
CMHC exports are table-driven.
Survey identifies the broader portal area, such as rental market data.
Series, dimension, and breakdown identify the table and its layout.
Region uses CMHC geography identifiers. These are not plain Census GeoUID values.
Filters narrow the export, such as season or other table-specific options.
Quick start
Common workflows
Discover tables
Browse bundled surveys, series, dimensions, breakdowns, and valid filters.
Fetch exports
Retrieve normalized observations or raw CSV for a known portal table.
Geography identifiers
CMHC export endpoints require geographyId and geographyTypeId. If you also have a Census GeoUID, pass it as geoUid; the SDK preserves it on normalized rows for downstream joins.
Attribution
CMHC data products have attribution requirements. Include the appropriate CMHC source notice when reproducing, adapting, or publishing CMHC data.