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
| Curricula | 224 | with 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 |
| Courses | 3,127 | catalogue records, all served; 1,956 have outcome content at the source, the rest are catalogue-only |
| Elements | 49,196 | all served (43,984 with text, 5,212 structural headings) |
| Learning outcomes | 30,394 | learning, general and specific outcomes |
| Other elements | 18,802 | 12,275 organizing ideas, guiding questions, topics and courses; 4,668 knowledge, understanding, skills and procedures; 1,585 front matter; 274 progressions |
| Plain-language glosses | 44,570 | every element with text (43,984, none missing); 5,212 headings have no text by design |
| Resources | 5,155 | records, 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 |
| Documents | 1,607 | PDFs stored, 49,605 pages of text extracted |
| Search chunks | 151,241 | 100% embedded; by language: en 96,018, fr 55,223 |
| Last harvest | Sep 10, 2026 | completed; audit 25 of 25 checks passed |
| Content | Government of Alberta | from 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
| Table | Export | Rows in database | Rows exported | Match |
|---|---|---|---|---|
curriculum_def | /api/v1/export/curricula | 553 | 553 | yes |
catalogue_course | /api/v1/export/catalogue_courses | 3,127 | 3,127 | yes |
subject_area | /api/v1/export/subject_areas | 267 | 267 | yes |
grade | /api/v1/export/grades | 13 | 13 | yes |
collection | /api/v1/export/collections | 29 | 29 | yes |
curriculum_node | /api/v1/export/nodes | 49,196 | 49,196 | yes |
node_enrichment | /api/v1/export/enrichment | 44,570 | 44,570 | yes |
resource | /api/v1/export/resources | 5,155 | 5,155 | yes |
node_resource_ref | /api/v1/export/node_resource_refs | 27,093 | 27,093 | yes |
asset | /api/v1/export/assets | 4,936 | 4,936 | yes |
asset_ref | /api/v1/export/asset_refs | 12,004 | 12,004 | yes |
pdf_document | /api/v1/export/pdf_documents | 1,608 | 1,608 | yes |
pdf_page | /api/v1/export/pdf_pages | 49,605 | 49,605 | yes |
chunk | /api/v1/export/chunks | 151,241 | 151,241 | yes |
audit_result | /api/v1/export/audit_results | 172 | 172 | yes |
change_log | /api/v1/export/change_log | 52,931 | 52,931 | yes |
pipeline_run | /api/v1/export/pipeline_runs | 43 | 43 | yes |
Quality trust levels of generated items and the latest matrix scorecard
| Kind | Items | Passed | Pass rate | Needs review |
|---|---|---|---|---|
| audio story | 8 | 4 | 50% | 0 |
| detailed pack | 4 | 2 | 50% | 2 |
| game/brain teaser | 8 | 2 | 25% | 5 |
| game/crossword | 8 | 4 | 50% | 4 |
| game/hangman | 8 | 8 | 100% | 0 |
| game/matching | 8 | 5 | 62.5% | 3 |
| game/maze | 8 | 6 | 75% | 1 |
| game/word search | 8 | 7 | 87.5% | 1 |
| homework sheet | 16 | 14 | 87.5% | 2 |
| marking guide | 8 | 7 | 87.5% | 1 |
| parent overview/parent | 8 | 2 | 25% | 6 |
| parent overview/year at a glance | 8 | 0 | 0% | 8 |
| presentation | 4 | 4 | 100% | 0 |
| prompt | 8 | 5 | 62.5% | 0 |
| quiz | 16 | 16 | 100% | 0 |
| rapid lesson | 8 | 5 | 62.5% | 2 |
| student homework | 8 | 8 | 100% | 0 |
| translation | 4 | 4 | 100% | 0 |
| word map | 8 | 8 | 100% | 0 |
Checks under 95% in this run: item_types_match, claims_supported, judge_review, readability_in_band, image_verdicts_accepted.
How search works
- Best match (
mode=hybrid, default): a meaning search over embeddings and an exact-words search run in parallel and are fused by reciprocal rank; passages found by both rise, learning outcomes get a small boost. - Exact words (
mode=lexical): full-text search only; best for codes, names and rare terms; snippets mark the matched words. - By meaning (
mode=vector): embedding similarity only, for passages that say the same thing in other words. - Find (
POST /api/v1/find): turns a sentence into filters (grades, subjects, audience, scope), resolves them to real courses with counts, and proposes the elements to use within a token budget. Filters on every mode: subject, grade, course, framework, kind, type, lang (English by default;anyfor both).
Endpoints open a row for parameters and the response shape
| Path | Returns | Example | |
|---|---|---|---|
| GET | /api/v1/subjects | Subject areas with counts |
|
| GET | /api/v1/curricula | Curricula, filterable |
|
| GET | /api/v1/curricula/{code}/tree | Flat tree rows with parent_id and children_count |
|
| GET | /api/v1/courses | Courses, including K to 6; cursor paged |
|
| GET | /api/v1/courses/{code}/outcomes | Whole course: set, flat nodes, nested tree; or a Markdown outline |
|
| GET | /api/v1/nodes/{id} | One element with bilingual text, ancestors and gloss |
|
| GET | /api/v1/nodes/{id}/children · /ancestors · /resources | Direct children; root to parent; linked resources |
|
| GET | /api/v1/code/{code} | Exact lookup of a curriculum, course or outcome code |
|
| GET | /api/v1/search | Ranked passages with breadcrumb, snippet, score, url |
|
| POST | /api/v1/find | A sentence to intent, curriculum sets and a proposed selection |
|
| POST | /api/v1/ask | Cited answer as one JSON document |
|
| GET | /api/ask/explore | SSE: every stage of an answer |
|
| GET | /api/ask/trace/{id} | Stored trace of an answer or explore run |
|
| GET | /api/v1/resources/{id} · /assets/{id} · /assets/{id}/pages/{n} | Resource detail; PDF or image bytes (ETag); one page of text |
|
| GET | /api/generate/tools | Tool kinds, parameters, tiers, estimated cost |
|
| POST | /api/generate/start · /{id}/confirm | SSE: generate material from nodeIds or from q (confirm:true pauses for review) |
|
| GET | /api/generate/{id} · /export.md|json|docx|pdf · /asset/{assetId} | The artifact and its exports (owner session or account) |
|
| GET | /api/v1/export/{table} | Bulk export of every table, paginated by key; nothing filtered out |
|
| GET | /api/v1/status · /register · /costs/summary · /costs/mine | Counts and modules; the data register; AI spend |
|
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)
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); }
}
}
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="")