Fetching Exam Years
SdashAPI contains past questions spanning from 2001 to 2026. If your application allows users to take mock exams from a specific year, you need to populate your user interface with valid, supported years rather than guessing them.
The Years Endpoint
2.7.1Just like the subjects endpoint, you can dynamically retrieve the list of available examination years by sending a GET request to the /years route.
GET https://sdashapi.com/api/v1/years
Understanding the Response
2.7.2The API will return a simple JSON array containing integers representing the 4-digit years. By default, SdashAPI returns these years sorted in descending order (newest first).
{
"status": 200,
"data": [
2026,
2025,
2024,
2023,
// ... down to 2001
]
}Building Year Selectors
2.7.3You can map over this array in React, Vue, or vanilla JavaScript to generate dropdown menus. Because the API already sorts the years (newest to oldest), you do not need to implement complex array sorting logic on your frontend—simply render them exactly as they arrive.
Similar Endpoints: Exam Types
2.7.4It is worth noting that SdashAPI also provides an endpoint to fetch exam types (e.g., UTME, WASSCE). It works exactly like the subjects and years endpoints.
GET https://sdashapi.com/api/v1/exams
You can use a combination of these three endpoints (Subjects, Years, and Exams) to build a powerful "Filter" sidebar in your application.