Data API Documentation
REST + JSON. Bearer auth. Monthly quotas.
Authentication
All requests require a Bearer token. Request one at /data-api.
Authorization: Bearer mw_live_xxxxxxxxxxxxxxxxInvalid or revoked keys return 401. Exceeded monthly quota returns 429 with the limit in the response.
Base URL
https://tupyuovacwrzxvvfgitm.supabase.co/functions/v1/data-api-v1Quick start
curl
curl -H "Authorization: Bearer $MW_API_KEY" \
"https://tupyuovacwrzxvvfgitm.supabase.co/functions/v1/data-api-v1/shortages?status=active&limit=50"JavaScript / TypeScript
const res = await fetch(
"https://tupyuovacwrzxvvfgitm.supabase.co/functions/v1/data-api-v1/coverage?province=Ontario&medication=metformin",
{ headers: { Authorization: `Bearer ${process.env.MW_API_KEY}` } }
);
const { data, quota } = await res.json();Python
import os, requests
r = requests.get(
"https://tupyuovacwrzxvvfgitm.supabase.co/functions/v1/data-api-v1/coverage-changes",
headers={"Authorization": f"Bearer {os.environ['MW_API_KEY']}"},
params={"since": "2026-06-01T00:00:00Z"},
)
print(r.json())Endpoints
GET/shortages
Canadian drug shortages from Health Canada, with status and recent change timestamps.
Query parameters
| status | Filter: active, anticipated, resolved |
| limit | Max 500. Default 100. |
Sample response
{
"data": [
{
"id": "uuid",
"drug_name": "Amoxicillin 500mg",
"company": "Apotex",
"status": "active",
"shortage_reason": "Manufacturing delay",
"anticipated_end_date": "2026-09-01",
"first_seen_at": "2026-04-12T10:21:00Z",
"last_status_change_at": "2026-06-01T08:30:00Z"
}
],
"count": 1,
"quota": { "used": 12, "limit": 1000 }
}GET/coverage
Provincial formulary status per medication/province with copay and notes.
Query parameters
| province | Exact province name (e.g. Ontario) |
| medication | Substring match on medication name |
| limit | Max 500. Default 100. |
Sample response
{
"data": [
{
"province": "Ontario",
"formulary_status": "covered",
"copay_estimate": "$2 - $6.11",
"notes": "Ontario Drug Benefit eligible",
"last_verified": "2026-06-10T12:00:00Z",
"medication": { "name": "Metformin", "slug": "metformin" }
}
],
"count": 1
}GET/coverage-changes
Recent provincial coverage status changes — designed for change-detection webhooks.
Query parameters
| since | ISO timestamp. Returns changes detected after this time. |
| limit | Max 500. Default 100. |
Sample response
{
"data": [
{
"medication_name": "Ozempic",
"province": "British Columbia",
"old_status": "special_authorization",
"new_status": "covered",
"notes": "BC PharmaCare update",
"detected_at": "2026-06-12T14:02:00Z"
}
],
"count": 1
}Rate limits & SLA
Trial: 1,000 calls / month. Clinic: 50,000 / month. Enterprise: custom + SLA.
Quota window: calendar month UTC, auto-resets on the 1st.
Every successful response includes quota.used and quota.limit.