API Documentation
Access 8,148 Statistics Canada datasets programmatically. Free, no API key required.
https://outcomecanada.ca/api/v1/tablesList all StatCan tables. Supports search and pagination.
qstringSearch query (searches title)limitnumberResults per page (default 20, max 100)offsetnumberPagination offsetGET /api/v1/tables?q=unemployment&limit=5{
"tables": [
{
"id": 14100287,
"title": "Labour force characteristics...",
"frequency": "Monthly",
"links": { "data": "/api/v1/tables/14100287/data" }
}
],
"total": 47,
"limit": 5,
"offset": 0
}/api/v1/tables/:idGet metadata for a specific table, including dimensions and members.
GET /api/v1/tables/14100287{
"id": 14100287,
"title": "Labour force characteristics...",
"dimensions": [
{ "position": 1, "name": "Geography", "members": [...] },
{ "position": 2, "name": "Labour force characteristics", "members": [...] }
]
}/api/v1/tables/:id/dataGet structured data with human-readable column headers. Returns pivoted table.
geostring"canada" (default), "provinces", or "all"seriesnumberMax series/columns (default 10, max 20)periodsnumberNumber of time periods (default 60, max 500)formatstring"json" (default) or "csv"GET /api/v1/tables/14100287/data?geo=provinces&format=json{
"id": 14100287,
"title": "Labour force characteristics...",
"columns": [
{ "key": "v2062815", "label": "Unemployment rate" }
],
"rows": [
{ "date": "2024-01-01", "v2062815": 5.7 }
]
}/api/v1/searchSemantic search across all 8,148 tables using AI embeddings.
qstringNatural language querylimitnumberResults (default 10)GET /api/v1/search?q=average rent by city[
{
"id": 34100133,
"title": "Canada Mortgage and Housing Corporation...",
"similarity": 0.87
}
]/api/askAsk a question in plain English. AI returns a data-backed answer.
qstringYour questionGET /api/ask?q=What is Canada's unemployment rate?{
"answer": "Canada's unemployment rate is 6.7% as of January 2026.",
"keyFigure": "6.7%",
"sources": [{ "tableId": 14100287, "title": "Labour force characteristics..." }],
"confidence": "high"
}Code Examples
import requests
# Search for tables
tables = requests.get("https://outcomecanada.ca/api/v1/tables?q=unemployment").json()
print(f"Found {tables['total']} tables")
# Get data
data = requests.get("https://outcomecanada.ca/api/v1/tables/14100287/data?geo=provinces").json()
for row in data["rows"][-3:]:
print(row["date"], row)
# Ask a question
answer = requests.get("https://outcomecanada.ca/api/ask?q=What is Canada's GDP?").json()
print(answer["answer"])// Search for tables
const tables = await fetch("https://outcomecanada.ca/api/v1/tables?q=unemployment")
.then(r => r.json());
console.log(`Found ${tables.total} tables`);
// Get data as CSV
const csv = await fetch("https://outcomecanada.ca/api/v1/tables/14100287/data?format=csv")
.then(r => r.text());
// Ask a question
const answer = await fetch("https://outcomecanada.ca/api/ask?q=What is Canada's GDP?")
.then(r => r.json());
console.log(answer.answer);library(httr)
library(jsonlite)
# Search
tables <- fromJSON("https://outcomecanada.ca/api/v1/tables?q=unemployment")
cat(paste("Found", tables$total, "tables\n"))
# Get data
data <- fromJSON("https://outcomecanada.ca/api/v1/tables/14100287/data")
tail(data$rows, 3)
# Download CSV directly
download.file(
"https://outcomecanada.ca/api/v1/tables/14100287/data?format=csv",
"unemployment.csv"
)Rate Limits
Free tier: 100 requests per day. No API key needed.
Data endpoint: Each data request calls StatCan's API in real-time, so expect 2-8 second response times.
Search: Semantic search is instant (<200ms) as it queries our pre-computed embeddings.
Ask: AI-powered answers take 1-3 seconds as they involve an LLM call.
All data comes from Statistics Canada under the Open Government Licence. This API is free for non-commercial use. For commercial use or higher rate limits, contact us.