Skip to content
marksheet

API docs

Every endpoint returns JSON. Metadata responses are cached for a day, and course level responses are never cached, so that a shared cache cannot hand a course list to somebody who was not allowed to read it.

The course level data is the scheme table the calculator uses. A semester response carries the course codes, the titles, the credits and the course types, which is enough to compute an SGPA without asking the site for anything else.

curl https://dev.vtu.drshn.tech/api/schemes/2022/branches/cs/semesters/3 \ -H "X-API-Key: your-key"

Endpoints

GET

/api

Scheme index

The list of schemes with their regulation code, semester range and totals.

Access: public

Response

{
  "schemes": [
    {
      "scheme": "2022",
      "name": "VTU 2022 Scheme",
      "regulation": "22OB",
      "stats": { "branches": 43, "courses": 1604, "credits": 4784 },
      "semesters": ["3", "4", "5", "6", "7", "8"]
    }
  ]
}
GET

/api/schemes

Scheme summaries

The scheme index with the grade scale and the percentage rule attached to every scheme.

Access: public

Response

{
  "schemes": [
    {
      "scheme": "2022",
      "name": "VTU 2022 Scheme",
      "regulation": "22OB",
      "gradeScale": [
        { "grade": "O", "points": 10, "min": 90, "max": 100, "label": "Outstanding" }
      ],
      "percentage": { "formula": "Percentage = CGPA x 10", "note": "..." }
    }
  ]
}
GET

/api/schemes/{scheme}

One scheme

The rules, the totals and the semester list of one scheme. The courses are not in this answer, they are read one branch and one semester at a time.

Access: public

Parameters

scheme
The scheme id. Either 2022 or 2025.

Response

{
  "scheme": "2022",
  "name": "VTU 2022 Scheme",
  "regulation": "22OB",
  "gradeScale": [],
  "percentage": {},
  "semesters": ["3", "4", "5", "6", "7", "8"],
  "stats": { "branches": 43, "courses": 1604, "credits": 4784 },
  "branchCount": 43,
  "branches": "/api/schemes/2022/branches"
}
GET

/api/schemes/{scheme}/branches

Branches of a scheme

The branch list of a scheme with the course and credit totals of each branch. The list is paginated.

Access: public

Parameters

scheme
The scheme id. Either 2022 or 2025.
limit
How many branches to return. 50 by default, 200 at most.
offset
Where to start. 0 by default.

Response

{
  "scheme": "2022",
  "count": 43,
  "limit": 50,
  "offset": 0,
  "branches": [
    {
      "key": "cs",
      "name": "Computer Science",
      "semesters": ["3", "4", "5", "6", "7", "8"],
      "stats": { "semesters": 6, "courses": 40, "credits": 120 }
    }
  ],
  "next": null
}
GET

/api/schemes/{scheme}/branches/{branch}

One branch

A branch with the course count and the credit total of each of its semesters.

Access: public

Parameters

scheme
The scheme id. Either 2022 or 2025.
branch
The branch key, as it appears in the branch list.

Response

{
  "scheme": "2022",
  "key": "cs",
  "name": "Computer Science",
  "stats": { "semesters": 6, "courses": 40, "credits": 120 },
  "semesters": {
    "3": { "courses": 8, "credits": 21 }
  }
}
GET

/api/schemes/{scheme}/branches/{branch}/semesters/{semester}

Courses of one semester

The courses of a single semester with the credits and the course type. Only courses with credits above zero count towards the SGPA. This answer needs a developer key or a calculator session.

Access: key or session

Parameters

scheme
The scheme id. Either 2022 or 2025.
branch
The branch key, as it appears in the branch list.
semester
The semester number, as it appears in the branch response.

Response

{
  "scheme": "2022",
  "branch": "cs",
  "semester": "3",
  "count": 8,
  "credits": 21,
  "courses": [
    {
      "code": "BCS301",
      "title": "Mathematics for Computer Science",
      "credits": 4,
      "type": "PCC/BS C"
    }
  ]
}
GET

/api/schemes/{scheme}/export

The whole scheme

Every branch, every semester and every course of a scheme in one answer. Five calls a day for one key.

Access: key

Parameters

scheme
The scheme id. Either 2022 or 2025.

Response

{
  "scheme": "2022",
  "regulation": "22OB",
  "branches": {
    "cs": {
      "key": "cs",
      "name": "Computer Science",
      "semesters": { "3": [] }
    }
  },
  "export": { "name": "your-key", "takenAt": "2026-01-01T00:00:00.000Z", "remainingToday": 4 }
}
POST

/api/session

Open a calculator session

Exchanges the token from the calculator page for a session id and a key. Every later answer for that session is encrypted with AES-GCM. The token arrives in the X-Marksheet-Page-Token header.

Access: public

Response

{
  "sessionId": "9f2c...",
  "key": "base64 of 32 bytes",
  "expiresAt": 1767225600000,
  "limits": { "requests": 150, "bytes": 98304 }
}

Errors

Every error carries the same shape. The message names the missing value and nothing else. No file path, no server detail.

{
  "error": {
    "code": "unknown_branch",
    "message": "That branch does not exist in this scheme."
  }
}

Rules

Grade scale
O 90 to 100 is 10 points, A+ 80 to 89 is 9, A 70 to 79 is 8, B+ 60 to 69 is 7, B 55 to 59 is 6, C 50 to 54 is 5, P 40 to 49 is 4 and F below 40 is 0. The scale is the same in both schemes.
SGPA
SGPA is the sum of course credits times grade points, divided by the sum of the course credits of the semester. Courses with no credits are left out of the average.
CGPA
CGPA is the sum of semester credits times semester SGPA, divided by the sum of the semester credits. Each semester SGPA is rounded to two decimals first, the way the marks card prints it.
Percentage
Percentage is CGPA times ten. Regulation 22OB clause 6.7 and regulation 25OB clause 26.0 define it that way.
Errors
An unknown scheme, branch or semester returns a 404. The body names the missing value and nothing else, no file paths and no server detail.