Developers
A free, read-only API, open data and MCP server for NTU modules, class indexes and exams.
Where to start#
QuickstartMake your first request in a minute, with curl or fetch.REST APIOne module as JSON, plus open data files for modules, class indexes and exams.MCP serverAdd NTUMods to Claude, ChatGPT, Claude Code or Cursor. Tools, limits and errors.WebMCPEarly preview: browser tools that let an assistant work on your own saved plans.GitHubExplore the source code, contribute or star the project.
Terms of use (no opt out)#
By using any API, file or the MCP server on this page, you accept these terms. There is no opt out. If you do not accept them, do not use them.
- You use these APIs entirely at your own risk. The owner of NTUMods is not responsible for, and is not implicated in, anything you build or do with them.
- The owner can change, restrict or remove any API, dataset or response format at any time, without notice.
Basics#
- Free to use. No API key and no sign-up. Every endpoint is a plain
GET, except the MCP server, which takesPOST. - The data is NTU public course data. It can be out of date or wrong, so always check STARS before you rely on it.
- A machine-readable OpenAPI 3.1 file is available.
Best practices#
- Cache what you fetch. Course data changes a few times a semester, so store responses instead of asking again.
- Download files for bulk work. If you need many modules, download
/data/api/modules.jsonor a semester file once. Do not call/api/modules/{code}in a loop. - Keep your request rate modest. Space requests out and avoid bursts of parallel calls.
- Back off on errors. On
429or503, wait the number of seconds in theRetry-Afterheader before you retry. Never retry in a tight loop. - Use the canonical URL. Send an uppercase module code with no query string, so you skip the
308redirect. - Do not abuse the service. Do not try to overload it, get around its limits or probe other routes, and do not use it to harm others.
- Tell your users the data can be wrong. Show how fresh your copy is and point them to STARS for anything that affects registration.