API

Public API

JSON access to the whole Alberta K-12 curriculum as AILI holds it: subjects, curricula, every element with its text, whole-course downloads, search, a sentence-to-curriculum finder and cited answers. Base URL https://goa-cc-uat-aili-app-001.azurewebsites.net, no key needed. The software is MIT licensed.

Call it

curl -s "https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/search?q=fractions&grade=5&limit=5" | jq '.data[] | {heading, url}'
curl -s -X POST https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/find -H 'Content-Type: application/json' -d '{"q":"Grade 3 math and English for my son"}' | jq '.data.sets[].course_code'
curl -s "https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/courses/MAT3/outcomes?depth=kusp" -o MAT3.json
# Pull everything: page each export until next_cursor is null (nodes, chunks, resources, assets, curricula, enrichment)
curl -s "https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/export/nodes?limit=1000" | jq '.meta.next_cursor'

Data register live counts, cached ten minutes · /api/v1/register

Curricula224with content, all served (222 published; 2 archived, hidden by default, exported with a flag; GFC 11, POS 211); 329 catalogue-only at the source (LDC 270, EXT 57, 2 unpublished), listed with the reason
Courses3,127catalogue records, all served; 1,956 have outcome content at the source, the rest are catalogue-only
Elements49,196all served (43,984 with text, 5,212 structural headings)
Learning outcomes30,394learning, general and specific outcomes
Other elements18,80212,275 organizing ideas, guiding questions, topics and courses; 4,668 knowledge, understanding, skills and procedures; 1,585 front matter; 274 progressions
Plain-language glosses44,570every element with text (43,984, none missing); 5,212 headings have no text by design
Resources5,155records, all listed; 3,684 files stored and downloadable; 1,129 need a teacher login at the source (linked with the reason); 60 large media linked, not stored; 52 external links; 8 unavailable upstream
Documents1,607PDFs stored, 49,605 pages of text extracted
Search chunks151,241100% embedded; by language: en 96,018, fr 55,223
Last harvestSep 10, 2026completed; audit 25 of 25 checks passed
ContentGovernment of Albertafrom curriculum.learnalberta.ca, subject to its terms of use. The AILI software is MIT licensed.

API exposure every table loaded or indexed: rows in the database against rows the export returns

TableExportRows in databaseRows exportedMatch
curriculum_def/api/v1/export/curricula553553yes
catalogue_course/api/v1/export/catalogue_courses3,1273,127yes
subject_area/api/v1/export/subject_areas267267yes
grade/api/v1/export/grades1313yes
collection/api/v1/export/collections2929yes
curriculum_node/api/v1/export/nodes49,19649,196yes
node_enrichment/api/v1/export/enrichment44,57044,570yes
resource/api/v1/export/resources5,1555,155yes
node_resource_ref/api/v1/export/node_resource_refs27,09327,093yes
asset/api/v1/export/assets4,9364,936yes
asset_ref/api/v1/export/asset_refs12,00412,004yes
pdf_document/api/v1/export/pdf_documents1,6081,608yes
pdf_page/api/v1/export/pdf_pages49,60549,605yes
chunk/api/v1/export/chunks151,241151,241yes
audit_result/api/v1/export/audit_results172172yes
change_log/api/v1/export/change_log52,93152,931yes
pipeline_run/api/v1/export/pipeline_runs4343yes

Quality trust levels of generated items and the latest matrix scorecard

Draft 1,014Verified 895Reviewed 0Draft: unedited output. Verified: every automatic check passed. Reviewed: approved by a signed-in person after the checks, claim verification and content judge all passed.
Evaluation run 2026-09-17T05-41-23-921Z · Sep 17, 2026 · 156 items evaluated
KindItemsPassedPass rateNeeds review
audio story8450%0
detailed pack4250%2
game/brain teaser8225%5
game/crossword8450%4
game/hangman88100%0
game/matching8562.5%3
game/maze8675%1
game/word search8787.5%1
homework sheet161487.5%2
marking guide8787.5%1
parent overview/parent8225%6
parent overview/year at a glance800%8
presentation44100%0
prompt8562.5%0
quiz1616100%0
rapid lesson8562.5%2
student homework88100%0
translation44100%0
word map88100%0

Checks under 95% in this run: item_types_match, claims_supported, judge_review, readability_in_band, image_verdicts_accepted.

Endpoints open a row for parameters and the response shape

PathReturnsExample
GET/api/v1/subjectsSubject areas with counts
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/subjects
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/subjects
Response
{ "data": [{ "code": "MAT", "name_en": "Mathematics", "bucket": "core", "curriculum_count": 14, "course_count": 18, "outcome_count": 648 }], "meta": { "count": 25 } }
GET/api/v1/curriculaCurricula, filterable
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/curricula?subject=MAT&fr
subject: subject area codeframework: GFC | POS | LDC | EXT
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/curricula?subject=MAT&framework=GFC
Response
{ "data": [{ "code": "MAT", "name_en": "Mathematics (K-6)", "framework": "GFC", "node_count": 704 }] }
GET/api/v1/curricula/{code}/treeFlat tree rows with parent_id and children_count
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/curricula/MAT/tree?depth=all
depth: 1 to 12, or all (default 5, above K/U/SP)course: one course code
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/curricula/MAT/tree?depth=all
Response
{ "data": [{ "id": 29914, "parent_id": null, "node_code": "MAT3", "node_type": "COURSE", "level_index": 1, "label": "Grade 3", "grade_codes": ["3"], "children_count": 7 }], "meta": { "count": 704, "pruned": false } }
GET/api/v1/coursesCourses, including K to 6; cursor paged
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/courses?subject=MAT&grad
subjectgradeframeworkcurriculumlimit: up to 1000 (default 500)cursor: last id of the previous page; meta.total and next_cursor
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/courses?subject=MAT&grade=5
Response
{ "data": [{ "id": "MAT5", "curriculum_code": "MAT", "grade_code": "5", "short_name_en": "Grade 5", "node_id": 30100 }] }
GET/api/v1/courses/{code}/outcomesWhole course: set, flat nodes, nested tree; or a Markdown outline
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/courses/MAT3/outcomes?depth=
depth: lo (default) | kuspformat: json (default) | outlinedownload: 1 to send as a file
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/courses/MAT3/outcomes?depth=kusp
Response
{ "data": { "set": { "course_code": "MAT3", "name": "Mathematics Grade 3", "framework": "GFC", "counts": { "organizing_ideas": 7, "guiding_questions": 11, "learning_outcomes": 11, "kusp": 20 } }, "nodes": [{ "id": 29914, "parent_id": null, "node_type": "COURSE", "label": "Grade 3", "text": null, "url": "/explore/node/29914" }], "tree": { "id": 29914, "children": [] } } }
GET/api/v1/nodes/{id}One element with bilingual text, ancestors and gloss
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/nodes/29917
id: numeric id or curriculum_code|path
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/nodes/29917
Response
{ "data": { "id": 29917, "node_type": "LO", "title_en": null, "content_en": "Students interpret place value to 100 000.", "content_fr": "...", "grade_codes": ["3"], "ancestors": [{ "id": 29914, "label": "Grade 3" }], "enrichment": { "plain_language_en": "..." }, "descendant_count": 4 } }
GET/api/v1/nodes/{id}/children · /ancestors · /resourcesDirect children; root to parent; linked resources
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/nodes/29917/children
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/nodes/29917/children
Response
{ "data": [{ "id": 29918, "parent_id": 29917, "node_type": "KUSP", "children_count": 3 }] }
GET/api/v1/code/{code}Exact lookup of a curriculum, course or outcome code
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/code/MAT5-OI2-GQ1-LO1
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/code/MAT5-OI2-GQ1-LO1
Response
{ "data": { "nodes": [{ "id": 30165, "label": "...", "curriculum_name": "Mathematics (K-6)" }], "curriculum": null, "course": null } }
GET/api/v1/searchRanked passages with breadcrumb, snippet, score, url
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/search?q=fractions&grade
q: two or more charactersmode: hybrid (default) | lexical | vectorlang: en (default) | fr | anysubject, grade, course, framework, type, kind: filters; grade and course take comma listslimit: 1 to 100
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/search?q=fractions&grade=5&course=MAT5&limit=5
Response
{ "data": [{ "chunk_id": 51001, "node_id": 30165, "kind": "node", "node_type": "LO", "heading": "...", "breadcrumb": "Mathematics (K-6) › Grade 5 › Number", "snippet": "... <mark>fractions</mark> ...", "score": 0.0512, "url": "/explore/node/30165" }], "meta": { "mode": "hybrid", "fallback": null, "lang": "en", "count": 5 } }
POST/api/v1/findA sentence to intent, curriculum sets and a proposed selection
-X POST /api/v1/find -d '{"q":"Grade 3 math and English for my son"
q: the requestfilters: overrides: grades[], subjects[], courses[], topics[], audience, scope, deliverablelanguage: en | frdeliverable: overview | lesson | quiz | homework | presentation | answer
curl -s -X POST https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/find -d '{"q":"Grade 3 math and English for my son"}' -H 'Content-Type: application/json'
Response
{ "data": { "intent": { "audience": "parent", "grades": ["3"], "subjects": [{ "code": "MAT", "name": "Mathematics" }], "scope": "whole-course", "deliverable": "overview" }, "sets": [{ "course_code": "MAT3", "name": "Mathematics Grade 3", "framework": "GFC", "counts": { "learning_outcomes": 11 }, "root_node_id": 29914 }], "selection": { "mode": "full", "tokens": 4476, "budget": 8000, "omitted_count": 0, "by_set": [{ "course_code": "MAT3", "kept": 11 }], "selected": [{ "node_id": 29915, "node_type": "OI", "path": "MAT3>MAT-OI1", "heading": "...", "set_index": 0, "role": "header" }] } }, "meta": { "cached": false } }
POST/api/v1/askCited answer as one JSON document
-X POST /api/v1/ask -d '{"question":"What do Grade 4 students learn abo
questionlang: en | frfilters: curriculum, course, grade
curl -s -X POST https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/ask -d '{"question":"What do Grade 4 students learn about fractions?"}' -H 'Content-Type: application/json'
Response
{ "data": { "answer": "In Grade 4 ... [S1].", "sources": [{ "n": 1, "heading": "...", "url": "/explore/node/30165", "vet": 0.9 }], "verification": [{ "n": 1, "claim": "...", "supported": "supported" }], "traceId": "ask_...", "costUsd": 0.041 } }
GET/api/ask/exploreSSE: every stage of an answer
curl -N "/api/ask/explore?q=Grade+5+fractions"
q, lang, grade, course, curriculumPOST body {q, intent}: reuse an intent from find, no intent model call
curl -N "https://goa-cc-uat-aili-app-001.azurewebsites.net/api/ask/explore?q=Grade+5+fractions"
Response
event types in order: intent, sets, angles, hits (per angle), fusion, vet, selection, context, sources, chunk (many), verification, done {traceId, costUsd, generate_options}
GET/api/ask/trace/{id}Stored trace of an answer or explore run
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/ask/trace/TRACE_ID
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/ask/trace/TRACE_ID
Response
{ "traceId": "...", "question": "...", "plan": {}, "angles": [], "candidates": [], "selected": [], "verification": [], "intent": {}, "sets": [], "selection": {} }
GET/api/v1/resources/{id} · /assets/{id} · /assets/{id}/pages/{n}Resource detail; PDF or image bytes (ETag); one page of text
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/assets/1747/pages/3
meta: 1 on /assets/{id} for metadata only
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/assets/1747/pages/3
Response
{ "data": { "asset_id": 1747, "page_num": 3, "text": "...", "language": "en" }, "meta": { "page_count": 120 } }
GET/api/generate/toolsTool kinds, parameters, tiers, estimated cost
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/generate/tools
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/generate/tools
Response
{ "tools": [{ "kind": "quiz", "label": "Quiz", "tier": "main", "params": { "question_count": { "type": "number", "min": 3, "max": 30 } }, "estimate": 0.02 }] }
POST/api/generate/start · /{id}/confirmSSE: generate material from nodeIds or from q (confirm:true pauses for review)
-X POST /api/generate/start -d '{"kind":"quiz","tier":&q
kind, tier, params, language, personanodeIds: element idsq, confirm: a sentence; pause at awaiting_confirmationselected_node_ids: on /confirm
curl -s -X POST https://goa-cc-uat-aili-app-001.azurewebsites.net/api/generate/start -d '{"kind":"quiz","tier":"fast","nodeIds":[30163,30164]}' -H 'Content-Type: application/json'
Response
events: start {artifactId}, intent, sets, selection, stage, rag {sources}, chunk {text}, image_pending, image {assetId, url, status}, validation, done {artifactId, costUsd}
GET/api/generate/{id} · /export.md|json|docx|pdf · /asset/{assetId}The artifact and its exports (owner session or account)
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/generate/ARTIFACT_ID/export.doc
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/generate/ARTIFACT_ID/export.docx
Response
{ "artifact": { "id": "...", "kind": "quiz", "status": "completed", "body_md": "...", "citations": [{ "node_id": 30165, "url": "/explore/node/30165" }], "assets": [] } }
GET/api/v1/export/{table}Bulk export of every table, paginated by key; nothing filtered out
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/export/nodes?limit=1000&
table: curricula, catalogue_courses, subject_areas, grades, collections, nodes, enrichment, resources, node_resource_refs, assets, asset_refs, pdf_documents, pdf_pages, chunks, audit_results, change_log, pipeline_runs (GET /api/v1/export lists them with keys and filters)limit: up to 1000 (200 with embeddings)cursor: the last key of the previous page; stop when next_cursor is nullsince: ISO date; rows changed after itcurriculum, course, framework, language, ...: per-table filterswith_embeddings: 1 on chunks returns the vector array
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/export/nodes?limit=1000&curriculum=MAT
Response
{ "data": [{ "id": 29917, "curriculum_code": "MAT", "node_type": "LO", "content_en": "..." }], "meta": { "next_cursor": "30916", "total": 49196, "limit": 1000, "table": "nodes" } }
GET/api/v1/status · /register · /costs/summary · /costs/mineCounts and modules; the data register; AI spend
curl https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/register
days: on costs/summary, default 30
curl -s https://goa-cc-uat-aili-app-001.azurewebsites.net/api/v1/register
Response
{ "data": { "curricula": { "total": 553, "published": 222 }, "elements": { "total": 48992, "by_family": { "outcomes": 23561 } }, "last_harvest": { "started_at": "..." } }, "meta": { "cached_at": "...", "ttl_seconds": 600 } }

Limits, keys and licence

60 requests a minute per network address; each response carries RateLimit: limit=60, remaining=N, reset=S and a 429 carries Retry-After. Answers are limited to 20 and explore runs to 30 per ten minutes per session. An X-API-Key header raises the limit and attributes usage; keys are issued on request. Responses are {data, meta} or {error:{code, message}}; ids are integers; Access-Control-Allow-Origin: *. Software: MIT, repository location to be published here. Content: Government of Alberta curriculum under its terms. Generated answers are AI output; see the disclaimer and send no personal information.

OpenAPI viewer · openapi.yaml · openapi.json · LICENSE · Disclaimer

Code samples: JavaScript and Python (including server-sent events)
JavaScript
const base = 'https://goa-cc-uat-aili-app-001.azurewebsites.net';
const { data } = await (await fetch(`${base}/api/v1/search?q=fractions&grade=5&limit=5`)).json();
console.log(data.map((x) => x.heading));

// Server-sent events with fetch (browser or Node 18+)
const res = await fetch(`${base}/api/ask/explore?q=${encodeURIComponent('Grade 5 fractions')}`);
const reader = res.body.getReader(); const dec = new TextDecoder(); let buf = '';
for (;;) {
  const { value, done } = await reader.read(); if (done) break;
  buf += dec.decode(value, { stream: true });
  let i; while ((i = buf.indexOf('\n\n')) >= 0) {
    const line = buf.slice(0, i).split('\n').find((l) => l.startsWith('data:')); buf = buf.slice(i + 2);
    if (line) { const evt = JSON.parse(line.slice(5)); if (evt.type === 'chunk') process.stdout.write(evt.text); }
  }
}
Python
import json, requests
BASE = "https://goa-cc-uat-aili-app-001.azurewebsites.net"
rows = requests.get(f"{BASE}/api/v1/search", params={"q": "fractions", "grade": "5", "limit": 5}, timeout=30).json()["data"]
course = requests.get(f"{BASE}/api/v1/courses/MAT3/outcomes", params={"depth": "kusp"}, timeout=60).json()["data"]

# Server-sent events without extra libraries
with requests.get(f"{BASE}/api/ask/explore", params={"q": "Grade 5 fractions"}, stream=True, timeout=300) as s:
    for raw in s.iter_lines(decode_unicode=True):
        if raw and raw.startswith("data:"):
            evt = json.loads(raw[5:])
            if evt.get("type") == "chunk": print(evt["text"], end="")
GET