Back to Blog
WAEC mock exam API

WAEC mock exam API

A WAEC mock exam API gives developers structured WASSCE questions that can be used to build timed mock examinations, CBT practice apps and school exam-preparation platforms.

The API supplies the examination data. Your application controls the timer, navigation, scoring, results and student experience.

For example, SdashAPI currently provides WASSCE questions through its REST API alongside UTME, NECO and Post-UTME data. SdashAPI

Real SdashAPI request for WASSCE questions

According to the current SdashAPI documentation, the V1 question endpoint is:

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

Authentication is sent through the AccessToken header. SdashAPI

For example, this is the documented pattern for WASSCE Mathematics:

curl "https://sdashapi.com/api/v1/q?subject=mathematics&type=wassce&limit=1" \
  -H "AccessToken: YOUR_ACCESS_TOKEN"

The important part is:

subject=mathematics
type=wassce
limit=1

For a larger mock session, you can increase the limit up to the documented maximum of 50 questions per request. SdashAPI

For example:

GET https://sdashapi.com/api/v1/q?subject=mathematics&type=wassce&year=2021&limit=40
AccessToken: YOUR_ACCESS_TOKEN

That gives your application a practical way to request a 40-question WASSCE Mathematics session from a particular year.

What does the real response look like?

The current SdashAPI documentation shows a WASSCE Mathematics response in this structure:

{
  "status": 200,
  "data": {
    "id": 5102,
    "question": "Solve for x: 2x + 5 = 15",
    "section": null,
    "option": {
      "a": "2",
      "b": "5",
      "c": "10",
      "d": "20"
    },
    "answer": "b",
    "solution": "Subtract 5 from both sides: 2x = 10. Divide by 2: x = 5.",
    "image": null,
    "examtype": "WASSCE",
    "examyear": "2021",
    "university": null
  }
}

This example is from the current SdashAPI documentation, rather than a guessed response format. SdashAPI

When limit=1, data is an object. When limit is greater than 1, data becomes an array of question objects. SdashAPI

That distinction is important when writing your code.

Building a WAEC mock examination

Suppose a student chooses:

WASSCE Mock Exam

Subject: Mathematics
Year: 2021
Questions: 40
Duration: 40 Minutes

Your application can prepare the session like this:

Student selects mock
        ↓
Your backend calls SdashAPI
        ↓
40 questions returned
        ↓
Create examination session
        ↓
Start timer
        ↓
Student answers questions
        ↓
Submit
        ↓
Calculate result

Don't start the timer until the questions required for the session have loaded successfully.

JavaScript example

The SdashAPI documentation uses the AccessToken header for authentication. A request for a WASSCE mock could therefore look like:

const response = await fetch(
  "https://sdashapi.com/api/v1/q?subject=mathematics&type=wassce&year=2021&limit=40",
  {
    headers: {
      AccessToken: process.env.SDASH_API_KEY
    }
  }
);

const result = await response.json();

if (result.status === 200) {
  const questions = result.data;

  console.log(questions);
}

The endpoint, authentication method and filtering parameters here follow the current documentation. SdashAPI

Build the mock interface around the data

Once the questions have been fetched, your app can present them like a normal CBT:

WASSCE Mathematics Mock

Time Remaining: 31:42

Question 12 of 40

Solve for x...

A. ...
B. ...
C. ...
D. ...

[ Previous ]            [ Next ]

You can also add a question navigator:

1   2   3   4   5
6   7   8   9   10
...

Answered, unanswered and flagged questions can have different states in your interface.

These features belong to your application rather than the API.

Don't show answers during the mock

The API response can contain answer and solution, but a proper mock examination should not reveal them while the student is still answering questions.

A better approach is:

Student receives question
        ↓
Selects an option
        ↓
Answer stored
        ↓
Continues examination
        ↓
Submits
        ↓
Results + explanations displayed

For stricter mock-exam behaviour, your backend can remove the answer and solution fields before sending the active examination payload to the frontend.

After submission, your backend can grade the attempt and return the review information.

Use explanations after submission

After the mock, students can review their mistakes.

For example:

Question 18

Your Answer: D
Correct Answer: B

Solution:
Subtract 5 from both sides...

This turns the mock examination into a learning tool rather than simply giving students a score.

SdashAPI V3 also provides a richer explanation block with fields such as summary, detailed, steps, why_correct and why_others_wrong. SdashAPI

That can be useful for applications that want a more detailed review experience.

Let students choose the year

Don't guess which years exist.

SdashAPI provides:

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

The years endpoint can be used to populate your year selector dynamically. SdashAPI

Your interface could therefore show:

Choose WASSCE Year

2026
2025
2024
2023
2022
...

and use the selected value in the question request.

WASSCE mock exams for different countries

If you're building beyond Nigeria, this is particularly important.

The current SdashAPI documentation lists WASSCE support for country filtering across Nigeria, Ghana, Sierra Leone, Liberia and The Gambia. Country filtering is documented on the V4 endpoint. SdashAPI

For example, the documented pattern for Ghana is:

GET /api/v4/q?type=wassce&country=GH&subject=mathematics
AccessToken: YOUR_ACCESS_TOKEN

This means you can design your application around:

WASSCE
   ↓
Country
   ↓
Subject
   ↓
Year
   ↓
Mock Examination

rather than assuming every WASSCE question belongs to the same country.

Handle API errors properly

Your mock application should also handle failed requests.

The current SdashAPI documentation lists responses including:


400  Bad request
401  Missing or invalid AccessToken
403  Account suspended
404  No questions matched the filters
429  Usage/quota limit reached
``` :chatgpt-content-reference{index="9"}


Don't show students raw API errors.

For example, if no questions match a selected year, show something useful:

> No Mathematics questions are currently available for this selection. Please choose another year.

## Start with the free development credits

SdashAPI provides development access that can be used while building and testing your CBT application.

You can test:

- WASSCE requests
- Subject filters
- Year filters
- Batch question fetching
- Timer integration
- Automatic scoring
- Solutions
- Images
- Passages
- Error handling

Then move to a separate production setup when the application is ready.

[SdashAPI Documentation](https://sdashapi.com/docs?utm_source=chatgpt.com)

You can also review [SdashAPI Coverage](https://sdashapi.com/coverage?utm_source=chatgpt.com) and [SdashAPI Pricing](https://sdashapi.com/pricing?utm_source=chatgpt.com) before launching.

SdashAPI is an independent examination-data platform and is not an official WAEC service.

A **WAEC mock exam API** should mainly solve the question-data problem. Your own software should still control the examination session, timing, answer storage, submission, scoring and review experience.
Avatar

How can we help?

We reply immediately

Hello! 👋 How can we help you today?