UiTMGetTable API
The JSON endpoints that power this app. Data is fetched live from UiTM on every request.
Overview
Every request is proxied live to UiTM's timetable system (SIMSweb) and MyStudent, so results always match the official portal. Browsing timetables is a three-step flow:
/api/campuses— list campuses/api/courses— list subjects offered at a campus/api/groups— get class groups for one subject, using thepathfrom step 2
Campuses
Returns every campus. Selangor (B) also needs a faculty code when listing courses.
[
{ "id": "B", "text": "SELANGOR CAMPUS - ( Please Select a Faculty )" },
{ "id": "A4", "text": "A4 - UITM KAMPUS TAPAH" },
{ "id": "K", "text": "K - UITM KAMPUS SUNGAI PETANI" },
...
]Courses
campusstringCampus id from /api/campuses. Required.
e.g. A4
facultystringFaculty code. Required when campus is B (Selangor), ignored otherwise.
e.g. CD
[
{ "code": "MAT133", "path": "index_tt.cfm?id1=...&id3=...&id2=..." },
{ "code": "CSC404", "path": "index_tt.cfm?id1=...&id3=...&id2=..." },
...
]codestringSubject code.
e.g. MAT133
pathstringOpaque link to the subject's class page. Pass it to /api/groups as-is. It is generated by UiTM per session, so use it soon after fetching rather than storing it.
Class Groups
pathstringThe path from /api/courses, URL-encoded. Required.
[
{
"day_time": "MONDAY( 10:00 AM-12:00 PM )",
"group": "A4AS120110",
"mode": "BOTH - Fulltime and Part-time",
"status": "First Timer and Repeater",
"room": "DK 200B",
"program": "AS120",
"faculty": "AS"
},
...
]day_timestringDay and time range of the session.
e.g. MONDAY( 10:00 AM-12:00 PM )
groupstringClass group code students register with.
e.g. A4AS120110
modestringWho the class is open to.
e.g. BOTH - Fulltime and Part-time
statusstringWhether first-timers, repeaters, or both can enrol.
e.g. First Timer and Repeater
roomstringVenue / room code.
e.g. DK 200B
programstringEligible programme codes. May be empty — UiTM no longer shows this for some subjects.
e.g. AS120
facultystringFaculty code. May be empty for the same reason.
e.g. AS
Student Timetable
Returns a student's registered classes from MyStudent. This is what Smart Fetch uses.
POST /api/getTimetable
Content-Type: application/json
{ "matricNumber": "2023123456" }[
{
"day": "Monday",
"day_time": "MONDAY( 10:00 AM-12:00 PM )",
"timeSlot": "10:00-12:00",
"class_code": "A4AS120110",
"subject_code": "MAT133",
"venue": "DK 200B",
"lecturer": "..."
},
...
]Returns 500 with { "error": "Failed to fetch timetable" } if the matric number has no published timetable.
Example
Get all class groups for MAT133 at Tapah (A4)
const BASE = "https://uitmgetable.my";
const courses = await fetch(`${BASE}/api/courses?campus=A4`).then(r => r.json());
const mat133 = courses.find(c => c.code === "MAT133");
const groups = await fetch(
`${BASE}/api/groups?path=${encodeURIComponent(mat133.path)}`
).then(r => r.json());
console.log(groups);