Public API Surface

Public NTU API for module catalogs, module details, timetable indexes, and venue lookups with integration-ready JSON.

Quick Start

Copy the base URL, hit the module catalog, and start wiring your client without guessing paths.

https://ntumodgodapi.vercel.app
1

Request the catalog

Use the full module catalog to populate search, hydration, and share-link restore flows.

GET /api/modules/catalog

curl https://ntumodgodapi.vercel.app/api/modules/catalog
2

Read the response

The payload returns meta plus a modules array with course codes, title, AU, exam info, and indices.

Endpoints

GET
/api/healthz

Checks API and MongoDB availability.

Sample response
{
  "ok": true,
  "database": "ntumodgod"
}
GET
/api/modules/catalog

Returns the full module catalog used by frontend search, hydration, and share parsing.

Sample response
{
  "meta": {
    "generatedAt": "2026-05-02T12:00:00.000Z",
    "totalModules": 978,
    "detailsCount": 978,
    "source": "seed_modules"
  },
  "modules": [
    {
      "courseCode": "AB0403",
      "courseTitle": "DECISION MAKING WITH PROGRAMMING & ANALYTICS*~#",
      "au": "3.0",
      "examInfo": null,
      "indices": [
        {
          "indexNumber": "00458",
          "sessions": [
            {
              "type": "SEM",
              "group": "1",
              "day": "MON",
              "startTime": "0830",
              "endTime": "1020",
              "venue": "S4-SR21",
              "remark": "Teaching Wk1-9,11-13"
            }
          ]
        }
      ]
    }
  ]
}
GET
/api/modules/details

Returns the full module detail catalog used by the module explorer.

Sample response
{
  "meta": {
    "generatedAt": "2026-05-02T12:00:00.000Z",
    "totalModules": 978,
    "detailsCount": 978,
    "source": "seed_modules"
  },
  "details": [
    {
      "courseCode": "AB0403",
      "moduleName": "DECISION MAKING WITH PROGRAMMING & ANALYTICS",
      "description": "This is an introductory course designed for business or accountancy undergraduate students who have no programming background and are interested to learn how to manage data and conduct business analytics programmatically.",
      "academicUnits": "3.0",
      "prerequisites": null,
      "mutuallyExclusiveWith": "AB8401, BC0401",
      "gradeType": null
    }
  ]
}
GET
/api/modules/:courseCode/indexes

Returns the timetable index data for one module.

Sample response
{
  "courseCode": "AB0403",
  "courseTitle": "DECISION MAKING WITH PROGRAMMING & ANALYTICS*~#",
  "au": "3.0",
  "indices": [
    {
      "indexNumber": "00458",
      "sessions": [
        {
          "type": "SEM",
          "group": "1",
          "day": "MON",
          "startTime": "0830",
          "endTime": "1020",
          "venue": "S4-SR21",
          "remark": "Teaching Wk1-9,11-13"
        }
      ]
    }
  ]
}
GET
/api/modules/:courseCode/details

Returns the detail record for one module.

Sample response
{
  "courseCode": "AB0403",
  "moduleName": "DECISION MAKING WITH PROGRAMMING & ANALYTICS",
  "description": "This is an introductory course designed for business or accountancy undergraduate students who have no programming background and are interested to learn how to manage data and conduct business analytics programmatically.",
  "academicUnits": "3.0",
  "prerequisites": null,
  "mutuallyExclusiveWith": "AB8401, BC0401",
  "gradeType": null
}
GET
/api/locations?venue=<venue-code>

Returns one resolved NTU venue location.

Sample response
{
  "venue": "S4-SR21",
  "location": {
    "coords": {
      "lat": 1.3447439029830544,
      "lng": 103.68261323494986
    },
    "floor": "B2",
    "title": "Tutorial Room + 160 (S4)",
    "building": "Block S4",
    "roomType": "Tutorial Room Plus",
    "identifier": "S4-B2C-48",
    "mazemapPoiId": 1003183352
  }
}

Integration Notes

400

Missing required input

Returned when a required route parameter or query string is omitted.

{
  "error": "venue query parameter is required"
}
404

Unknown record

Returned when the course code or venue cannot be resolved from the current dataset.

{
  "error": "Module details not found"
}
429

Shared request limit reached

Returned when the public deployment throttles repeated requests from the same client.

{
  "error": "Too many requests, please try again later."
}