Live dataRead-onlyServer-side only

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:

  1. /api/campuses — list campuses
  2. /api/courses — list subjects offered at a campus
  3. /api/groups — get class groups for one subject, using the path from step 2

Campuses

GET/api/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

GET/api/courses?campus={campus}&faculty={faculty}
Query parameters
campusstring

Campus id from /api/campuses. Required.

e.g. A4

facultystring

Faculty 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=..." },
  ...
]
Response fields
codestring

Subject code.

e.g. MAT133

pathstring

Opaque 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

GET/api/groups?path={path}
Query parameters
pathstring

The 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"
  },
  ...
]
Response fields
day_timestring

Day and time range of the session.

e.g. MONDAY( 10:00 AM-12:00 PM )

groupstring

Class group code students register with.

e.g. A4AS120110

modestring

Who the class is open to.

e.g. BOTH - Fulltime and Part-time

statusstring

Whether first-timers, repeaters, or both can enrol.

e.g. First Timer and Repeater

roomstring

Venue / room code.

e.g. DK 200B

programstring

Eligible programme codes. May be empty — UiTM no longer shows this for some subjects.

e.g. AS120

facultystring

Faculty code. May be empty for the same reason.

e.g. AS

Student Timetable

POST/api/getTimetable

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);

Notes

🖥️
Server-side only
Responses don't include CORS headers, so browsers on other sites can't call these endpoints directly. Call them from your own server or script.
🤝
Fair use
Every request hits UiTM's servers. Cache what you fetch and avoid bulk scraping. Heavy traffic can get the whole service blocked for everyone.
⚠️
Always cross-check
Data comes straight from UiTM, but their pages change without notice. Verify with the official portal before finalising your registration.
📦
Open Source
The scraper and this app are open source on GitHub. PRs welcome.