CIHI Canadian Health Data API
cihi.ca · Government
Data access services from the Canadian Institute for Health Information (CIHI) — the authoritative source for Canadian health system performance data. CIHI curates national health expenditure data, hospital administrative databases (DAD, NACRS), wait time information, long-term care data, and physician workforce statistics. Data is critical for group benefits, disability insurance, and healthcare analytics. Bulk data access via application; select datasets via open data.
Authentication
Parameter name: X-CIHI-Token (in header)
Sample Requests
National Health Expenditure (NHEX) data is published annually by CIHI. Download the Excel/CSV file directly — no API key needed for public NHEX tables.
Hover any highlighted part to learn what it does
curl -X GET "https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://www.cihi.ca/sites/default/files/document/nhex-series-a-2023-en.xlsx" \ -H "X-CIHI-Token: YOUR_API_KEY"
import requests
headers = {
"X-CIHI-Token": "YOUR_API_KEY"
}
response = requests.get(
"https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://www.cihi.ca/sites/default/files/document/nhex-series-a-2023-en.xlsx",
headers=headers,
)
print(response.json())const url = 'https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://www.cihi.ca/sites/default/files/document/nhex-series-a-2023-en.xlsx';
const response = await fetch(url, {
headers: {
'X-CIHI-Token': 'YOUR_API_KEY'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://www.cihi.ca/sites/default/files/document/nhex-series-a-2023-en.xlsx"
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("X-CIHI-Token", "YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://www.cihi.ca/sites/default/files/document/nhex-series-a-2023-en.xlsx")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["X-CIHI-Token"] = "YOUR_API_KEY"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://www.cihi.ca/sites/default/files/document/nhex-series-a-2023-en.xlsx";
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"X-CIHI-Token: YOUR_API_KEY"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));CIHI's open datasets are discoverable through the federal open data portal. Returns CIHI datasets available for download.
Hover any highlighted part to learn what it does
curl -X GET "https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://open.canada.ca/data/api/3/action/package_search?q=CIHI&rows=10" \ -H "X-CIHI-Token: YOUR_API_KEY"
import requests
headers = {
"X-CIHI-Token": "YOUR_API_KEY"
}
response = requests.get(
"https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://open.canada.ca/data/api/3/action/package_search?q=CIHI&rows=10",
headers=headers,
)
print(response.json())const url = 'https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://open.canada.ca/data/api/3/action/package_search?q=CIHI&rows=10';
const response = await fetch(url, {
headers: {
'X-CIHI-Token': 'YOUR_API_KEY'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://open.canada.ca/data/api/3/action/package_search?q=CIHI&rows=10"
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("X-CIHI-Token", "YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://open.canada.ca/data/api/3/action/package_search?q=CIHI&rows=10")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["X-CIHI-Token"] = "YOUR_API_KEY"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://apps.cihi.ca/mstrapp/asp/MSTRWebAPI.aspx/https://open.canada.ca/data/api/3/action/package_search?q=CIHI&rows=10";
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"X-CIHI-Token: YOUR_API_KEY"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- Public aggregate data: download directly from cihi.ca/en/access-data-and-reports
- Detailed microdata: apply for access at cihi.ca/en/access-data/applying-for-data
- CIHI open datasets on open.canada.ca: search "CIHI" or "Canadian Institute for Health Information"
- National Health Expenditure (NHEX): published annually — no API, direct file download
- Wait time data (Wait Times in Canada): published at waittimes.cihi.ca as open CSV/Excel
- Pan-Canadian Joint Replacement Registry and cardiac data available under data agreement
What can you build with CIHI Canadian Health Data API?
CIHI Canadian Health Data API is a Government API. Developers commonly use government APIs for:
- surfacing public datasets in citizen-facing apps
- building transparency and civic engagement tools
- accessing legislation, court records, and official data
- powering research and journalism tools
- creating compliance and regulatory monitoring dashboards
API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control. CIHI Canadian Health Data API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?