Back to Blog

Past questions API by year

A past questions API by year allows developers to retrieve examination questions from a specific year instead of mixing questions from different examination periods.

For example, a student may want to practise:

UTME → Biology → 2024

rather than receiving random Biology questions from several years.

Year filtering is useful for CBT apps, past-question platforms, school revision systems and EdTech products that allow students to study examination trends over time.

SdashAPI supports year-based question retrieval for examinations such as UTME, WASSCE, NECO and Post-UTME.

Using the real SdashAPI year filter

According to the current SdashAPI Documentation, questions are available through endpoints such as:

GET https://sdashapi.com/api/v1/q

Authentication is provided through the AccessToken header.

A request can combine subject, type, year and limit.

For example:

curl -X GET "https://sdashapi.com/api/v1/q?subject=physics&type=utme&year=2019&limit=40" \
  -H "AccessToken: YOUR_ACCESS_TOKEN"

This request means:

Exam: UTME
Subject: Physics
Year: 2019
Questions requested: 40

Your application can use the returned data to create a dedicated 2019 Physics practice session.

Fetching questions from another year

Changing the year is straightforward.

For example:

GET https://sdashapi.com/api/v1/q?subject=biology&type=utme&year=2024&limit=40

For another year:

GET https://sdashapi.com/api/v1/q?subject=biology&type=utme&year=2023&limit=40

The rest of your CBT application doesn't need to change.

That means one interface can support:

Biology

2024 Past Questions
2023 Past Questions
2022 Past Questions
2021 Past Questions
2020 Past Questions

Don't hard-code available years

A better application should not assume that every examination has questions for every year.

SdashAPI provides a years endpoint:

GET https://sdashapi.com/api/v1/years

You can use the available-year data to build your selector instead of manually typing years into your application.

For example:

Choose Examination
       ↓
Choose Subject
       ↓
Choose Available Year
       ↓
Start Practice

This also makes your frontend easier to maintain as coverage changes.

JavaScript example

A simple backend function could accept the student's subject and year:

async function getPastQuestions(subject, year) {
  const url =
    `https://sdashapi.com/api/v1/q?subject=${subject}` +
    `&type=utme&year=${year}&limit=40`;

  const response = await fetch(url, {
    headers: {
      AccessToken: process.env.SDASH_API_KEY
    }
  });

  return response.json();
}

Then:

const questions = await getPastQuestions("biology", 2024);

Your frontend doesn't need direct access to the SdashAPI production credential.

A cleaner production architecture is:

Mobile/Web App
      ↓
Your Backend
      ↓
SdashAPI

Build a year-selection page

From the student's perspective, this can remain very simple:

UTME Biology Past Questions

Select Year

[ 2024 ]
[ 2023 ]
[ 2022 ]
[ 2021 ]
[ 2020 ]

After selecting a year:

2024 UTME Biology

40 Questions

[ Start Practice ]

Your backend then makes the appropriate API request.

Year practice and random practice are different

Your application can support both.

Past Questions by Year

UTME
→ Chemistry
→ 2022
→ Start

This is useful when students specifically want questions associated with a particular examination year.

Mixed-Year Practice

UTME
→ Chemistry
→ Mixed Years
→ Start

This is useful for general revision.

Topic Practice

With richer metadata:

UTME
→ Chemistry
→ Organic Chemistry
→ Start

These modes can coexist inside the same application.

Combine year with other filters

Year becomes more useful when combined with other information.

For example:

Exam + Subject + Year

gives:

UTME + Mathematics + 2023

For supported WASSCE data, applications may also need country context:

WASSCE
   ↓
Country
   ↓
Subject
   ↓
Year

This is useful for developers building exam-preparation products for multiple West African markets rather than assuming all WASSCE content belongs to one country.

Check SdashAPI Coverage for currently available examinations and coverage.

What if fewer questions exist for a year?

Your application should not assume that every request will always return the exact amount requested.

If a student requests:

Year: 2018
Questions: 40

but fewer suitable questions are available, your interface should handle that gracefully.

For example:

27 questions are currently available for this selection.

You can allow the student to continue with those questions instead of breaking the entire session.

Similarly, if nothing matches the selected combination, provide another year or subject option.

Use years for performance tracking

Year-based practice can also produce useful analytics.

For example:

Your UTME Biology Results

2024     78%
2023     71%
2022     66%
2021     74%

You can store each attempt with information such as:

{
  "exam": "utme",
  "subject": "biology",
  "year": 2024,
  "score": 31,
  "total": 40
}

Your application can then show progress without changing anything about the underlying question API.

Use richer question data when necessary

If your app only needs questions, options and answers, a basic API version may be sufficient.

If you're building more advanced features involving topics, subtopics, difficulty or detailed explanations, SdashAPI also provides richer API versions.

The important thing is to choose the data level your application actually needs rather than requesting unnecessary information.

Start with 2,000 free credits

Developers can start with 2,000 free SdashAPI credits for development and testing.

You can use them to test:

  • Year filtering
  • Subject filtering
  • Different examinations
  • Question loading
  • CBT navigation
  • Scoring
  • Explanations
  • Missing-year handling
  • Result tracking

A practical development flow is:

Create SdashAPI account
        ↓
Get 2,000 free credits
        ↓
Choose an examination
        ↓
Fetch available years
        ↓
Request questions for a year
        ↓
Build your CBT interface
        ↓
Test

When your application is ready for real users, you can create a separate production API key and choose an appropriate option through SdashAPI Pricing.

A past questions API by year gives students much more control over how they practise. Instead of treating thousands of questions as one large bank, your application can organise them by examination, subject and year while using the API to handle the underlying question data.

Avatar

How can we help?

We reply immediately

Hello! 👋 How can we help you today?