Public REST API for accessing SFU course data, enrollment statistics, and grade distributions.
https://api.sfucourseplanner.com/api/aboutReturns application metadata.
Example Response:
{
"appName": "CoursePlanner",
"authorName": "Anonymouse"
}/api/departmentsReturns all departments at SFU.
Example Response:
[
{
"deptId": 1,
"deptCode": "CMPT",
"name": "Computing Science"
},
{
"deptId": 2,
"deptCode": "MATH",
"name": "Mathematics"
}
]/api/departments/{deptId}/coursesReturns all courses in a department.
| Parameter | Description |
|---|---|
| deptId | Department ID (from /api/departments) |
Example Request:
GET /api/departments/1/coursesExample Response:
[
{
"courseId": 42,
"deptId": 1,
"courseNumber": "120",
"title": "Introduction to Computing Science and Programming I",
"description": "An elementary introduction to computing...",
"units": 3,
"degreeLevel": "UGRD",
"prerequisites": "BC Math 12 or equivalent",
"corequisites": null,
"designation": "Q"
}
]/api/departments/{deptId}/courses/{courseId}/offeringsReturns all offerings for a course across the last 12 semesters.
| Parameter | Description |
|---|---|
| deptId | Department ID |
| courseId | Course ID |
Example Request:
GET /api/departments/1/courses/42/offeringsExample Response:
[
{
"section": "D100",
"infoUrl": "/browse/info/2025fa-cmpt-120-d1",
"term": "Fall",
"year": 2025,
"semesterCode": 1257,
"isEnrolling": true,
"location": "Burnaby",
"instructors": "John Doe",
"enrolled": "96",
"capacity": "100",
"loadPercent": 96
}
]/api/departments/{deptId}/courses/{courseId}/offerings/{semesterCode}Returns detailed information about a course offering for a specific semester, including grade statistics and all sections.
| Parameter | Description |
|---|---|
| deptId | Department ID |
| courseId | Course ID |
| semesterCode | Semester code (e.g., 1257 for Fall 2025) |
Example Request:
GET /api/departments/1/courses/42/offerings/1257Example Response:
{
"deptCode": "CMPT",
"courseNumber": "120",
"title": "Introduction to Computing Science I",
"year": 2025,
"term": "Fall",
"campus": "Burnaby",
"medianGrade": "B+",
"failRate": 8.5,
"gradeDistribution": {
"A+": 15,
"A": 25,
"A-": 20,
"B+": 18,
"B": 12
},
"description": "An elementary introduction...",
"prerequisites": "BC Math 12",
"corequisites": null,
"units": 3,
"degreeLevel": "UGRD",
"designation": "Q",
"sections": [
{
"section": "D100",
"infoUrl": "/browse/info/2025fa-cmpt-120-d1",
"term": "Fall",
"year": 2025,
"semesterCode": 1257,
"isEnrolling": true,
"location": "Burnaby",
"instructors": "John Doe",
"enrolled": "96",
"capacity": "100",
"loadPercent": 96
}
],
"outlineUrl": "https://www.sfu.ca/outlines.html?dept=CMPT&number=120"
}/api/graph/grade-distributionReturns grade distribution statistics from CourseDiggers.
| Parameter | Description |
|---|---|
| courseId | Course ID (query parameter) |
Example Request:
GET /api/graph/grade-distribution?courseId=42Example Response:
{
"deptCode": "CMPT",
"courseNumber": "120",
"title": "Introduction to Computing Science I",
"medianGrade": "B+",
"failRate": 8.5,
"gradeDistribution": {
"A+": 15,
"A": 25,
"A-": 20,
"B+": 18,
"B": 12,
"B-": 8,
"C+": 5,
"C": 3,
"C-": 2,
"D": 1,
"F": 1
}
}/api/graph/enrollment-historyReturns enrollment history for a course over time (live data from CourseSys).
| Parameter | Description |
|---|---|
| deptId | Department ID (query parameter) |
| courseId | Course ID (query parameter) |
| range | Time range: "1yr", "3yr", or "5yr" (optional, default: "5yr") |
Example Request:
GET /api/graph/enrollment-history?deptId=1&courseId=42&range=3yrExample Response:
[
{
"semesterCode": 1227,
"term": "Fall",
"year": 2022,
"totalEnrolled": 450,
"totalCapacity": 500,
"loadPercent": 90.0
},
{
"semesterCode": 1231,
"term": "Spring",
"year": 2023,
"totalEnrolled": 380,
"totalCapacity": 400,
"loadPercent": 95.0
}
]Semester codes are 4-digit numbers in the format YYYC where:
Examples: