API
Statistics Canada data, ready to use.
Free, read-only JSON over HTTPS for every Statistics Canada table, with values as published.
Base URL https://statcan2.ca/api
Quick start
Plan a chart from text
curl -s 'https://statcan2.ca/api/v1/plan?q=unemployment%20rate%20in%20Canada'{"status":"ok","q":"unemployment rate in Canada","spec":{"v":1,"layers":[{"pid":"14100287",…}]},"build_id":"wds-full-1+census-full-1","normalized_build_id":"n8"}Run a view
curl -s 'https://statcan2.ca/api/v1/view?s=eyJ2IjoxLCJsYXllcnMiOlt7InBpZCI6IjE0MTAwMjg3IiwiZGltcyI6eyIxIjp7InVzZSI6ImZpeGVkIiwibWVtYmVycyI6eyJlcSI6MX19LCIyIjp7InVzZSI6ImZpeGVkIiwibWVtYmVycyI6eyJlcSI6N319LCIzIjp7InVzZSI6ImZpeGVkIiwibWVtYmVycyI6eyJlcSI6MX19LCI0Ijp7InVzZSI6ImZpeGVkIiwibWVtYmVycyI6eyJlcSI6MX19LCI1Ijp7InVzZSI6ImZpeGVkIiwibWVtYmVycyI6eyJlcSI6MX19LCI2Ijp7InVzZSI6ImZpeGVkIiwibWVtYmVycyI6eyJlcSI6MX19fX1dLCJ0aW1lIjp7InByZXNldCI6IjVZIn0sInRyYW5zZm9ybSI6ImxldmVsIiwiY2hhcnQiOnsidHlwZSI6ImxpbmUifX0'{"title":"Unemployment rate","subtitle":"Canada · 15 years and over · Estimate · Seasonally adjusted · Sep 2021 – Aug 2026 · Percent","series":[{"name":"Unemployment rate","points":[…]}]}Get table observations
curl -s 'https://statcan2.ca/api/v1/tables/18100004/observations?limit=2'{"pid":"18100004","total":1152913,"limit":2,"rows":[{"ref_date":"1914-01","value":"6.0","status":""},{"ref_date":"1914-02","value":"6.0","status":""}]}Endpoint reference
Charts
GET
/api/v1/planTurn plain text into a chart spec and alternatives.q · view=1GET POST
/api/v1/viewRun an encoded or JSON ViewSpec.s (GET) · ViewSpec body (POST)GET POST
/api/v1/view.parquetDownload the resolved view as Parquet.s (GET) · ViewSpec body (POST)GET POST
/api/v1/view.csvDownload the resolved view as CSV.s (GET) · ViewSpec body (POST)GET
/api/v1/highlightsTwelve build-pinned headline indicators for the home page.GET
/api/v1/regionsNamed Canadian region definitions used in chart specs.GET
/api/v1/cubesSearch chartable tables.q · limitGET
/api/v1/cubes/{pid}Dimensions, members, roles, defaults, units and periods.GET
/api/v1/cubes/{pid}/viewsStarter chart specs for one table.Tables
GET
/api/v1/tablesSearch table titles, dimensions, members and notes.q · archived · kind · family · queryable · limit · offsetGET
/api/v1/tables/{pid}Table metadata, dimensions, members, notes and corrections.GET
/api/v1/tables/{pid}/observationsFiltered published observation rows.from · to · vector · m1…m9 · limit · offsetGET
/api/v1/tables/{pid}/seriesSeries grouped by vector or coordinate.from · to · vector · m1…m9Series
GET
/api/v1/seriesSearch series by table title and member labels.q · pid · place_id · unit_family · limit · offsetGET
/api/v1/series/{pid}/{vector}One WDS vector with metadata and every point.GET
/api/v1/series/{pid}/c/{coordinate}One coordinate-keyed series, including Census cells.Places
GET
/api/v1/placesSearch places by name, DGUID, place ID or code.q · limit · offsetGET
/api/v1/places/{place_id}A place, its vintages, parent and covering tables.Files
GET
/api/v1/tables/{pid}/observations.parquetWhole-table Parquet for the current build.GET
/api/v1/tables/{pid}/source.zipOriginal Statistics Canada ZIP: the captured copy, or a redirect to Statistics Canada.Build
GET
/api/v1/buildBuild, capture, manifest and code-set provenance.GET
/api/v1/coverageInventory, capture and queryable coverage.GET
/api/v1/openapi.jsonOpenAPI document for every route above.Machine-readable schemas
Notes
- Values and status marks stay as published. A blank value is not zero.
- Every response includes build provenance.
- No API key is needed.
- Please cache repeat requests and keep request rates polite.