Guide 2.2: Developer Guide

Understanding SdashAPI V2

SdashAPI V2 builds upon the blazing-fast foundation of V1 by introducing our first layer of metadata processing. While V1 treats a question merely as text, V2 begins to understand the educational context of the question, making it ideal for categorized study apps.

Accessing V2

2.2.1

To use the V2 endpoint, you simply change the path in your API request from /v1/ to /v2/. All of the query parameters you used in V1 (like type and subject) remain exactly the same.

GET https://sdashapi.com/api/v2/q?type=utme&subject=physics

The Metadata Layer

2.2.2

When you request a question via V2, the JSON response includes a new object called metadata. This object provides structured information about the question's origin and categorization.

{
  "status": 200,
  "data": {
    "question": "What is the unit of force?",
    "metadata": {
      "topic": "Mechanics",
      "subtopic": "Newton's Laws",
      "exam_board": "JAMB",
      "year_introduced": 2012
    }
  }
}

Building Topic-Based Quizzes

2.2.3

Because V2 returns the topic property, you can finally build applications that allow users to study specific areas of a syllabus. For example, instead of a random Physics quiz, you can fetch questions, read the metadata, and only present questions categorized under "Mechanics" to the user.

Performance Trade-offs

2.2.4

Retrieving and attaching metadata requires a slightly more complex database join on our backend servers. As a result, V2 requests take roughly 10-15ms longer than V1 requests. For most applications, this difference is completely imperceptible.

Want difficulty ratings?

Next, we will look at V3, which calculates question difficulty.

Next Guide: Understanding V3 →
Avatar

How can we help?

We reply immediately

Hello! 👋 How can we help you today?