Community data Governmental Free & Open

Statistics Canada

Canada's national statistical agency. Publishes authoritative data on the Canadian economy, labour market, prices, trade, population, and business activity. Open licence, free commercial use with attribution.

API Quickstart

No quickstart snippet available for this source yet.

💳 Access & Pricing
Visit source →

Cost

Free

Access type

open

Signup required

No

Update alerts

Not offered

Coverage

north america

Update frequency

monthly

Source Documentation

What You're Getting

Statistics Canada (StatCan) is the national statistical agency for Canada. It publishes authoritative data on the Canadian economy (GDP, national accounts, trade), labour market (LFS — unemployment, employment, wages), prices (CPI, housing), population (Census, vital statistics), and business (manufacturing, retail sales). The Web Data Service provides structured access to 5,000+ tables via a JSON API using Product IDs (PIDs).

Ingestion Strategy

Use Product IDs (PIDs) — 8-digit codes visible in the URL when browsing the StatCan website. Bulk CSV download is the most reliable path for full table history.

import requests, pandas as pd, io

STATCAN_API = "https://www150.statcan.gc.ca/t1/tbl1/en"

def fetch_statcan_csv(pid: str) -> pd.DataFrame:
    url = f"{STATCAN_API}/dtblDownload/{pid}/download/{pid}.csv"
    r = requests.get(url)
    r.raise_for_status()
    return pd.read_csv(io.BytesIO(r.content), encoding="latin-1")

# CPI — Table 18-10-0004-01
cpi = fetch_statcan_csv("18100004")

# Labour Force Survey — Table 14-10-0287-01
lfs = fetch_statcan_csv("14100287")

Rate Limits & API Details

  • No published rate limit
  • Web Data Service: www150.statcan.gc.ca/t1/tbl1/en
  • Key PIDs: 18100004 (CPI), 14100287 (LFS), 36100434 (GDP), 12100121 (merchandise trade)
  • JSON API: /getDataFromCubePidCoordAndLatestNPeriods/{pid}/{coord}/{n}

Schema Stability

Very stable. PIDs are permanent. CSV columns (REF_DATE, GEO, DGUID, VALUE, STATUS, SYMBOL) consistent for years. STATUS column carries quality flags: E = use with caution, F = suppressed, r = revised.

Data Quality Gotchas

  • Encoding: bulk CSVs use latin-1 — specify on read
  • STATUS flags: F values appear as blank VALUE — suppressed, not missing
  • Revision cadence: LFS revised monthly; GDP revised quarterly with benchmark revisions every 5 years
  • Large tables: trade by commodity × partner × province can reach millions of rows — filter via JSON API

Notable Datasets

9 total
  • Consumer Price Index (CPI)
  • Labour Force Survey (LFS — unemployment, employment, wages)
  • GDP by Expenditure Approach
  • Merchandise Trade
  • Retail Trade
  • Manufacturing Sales
  • Housing Starts and Completions
  • Population Estimates and Projections
  • Business Conditions Survey
Visit Data Source

Access

Cost
Free
Access type
Open
Update alerts
Not offered

Data Profile

Coverage
North America
Frequency
Monthly
History from
1914
Source updated
Jan 2025

Data Formats

csv xlsx json api

How to Access

  • 🌐 Browser/UI
  • Automation Ready programmable

Index entry

Added: May 2, 2026

Last indexed: May 2, 2026

~ Community-sourced entry

Learn

Recent guides

View all →