A comprehensive migration blueprint for developers transitioning from legacy questions.aloc.com.ng endpoints to modern ALOC Station assessment infrastructure.
The legacy endpoint service (questions.aloc.com.ng) continues to support over 3,000 active developers until July 31, 2027. While legacy endpoints remain operational for existing applications, all new features, curriculum taxonomy (L2), AI step-by-step worked solutions (L3), official SDKs, and Model Context Protocol (MCP) tooling are exclusive to ALOC Station.
Legacy ALOC was designed as a flat question retrieval feed. ALOC Station transforms this into a multi-layered assessment engine with psychometric seeding, anti-cheating sessions, and deep curriculum taxonomy.
| Dimension | Legacy (v1/v2 aloc-endpoints) | ALOC Station (Modern) |
|---|---|---|
| Base URL | https://questions.aloc.com.ng/api/v2 | https://dev.aloc.com.ng/api/v1 |
| Authentication | AccessToken: <token> header | X-API-Key: aloc_live_... / Bearer header |
| Developer Tooling | Raw HTTP / cURL only | TypeScript SDK, Python SDK, MCP Server |
| Data Depth | Raw question & static answer (L1) | L1 (Raw), L2 (Taxonomy), L3 (Solutions), L4 (Vector) |
| Exam Session State | Manual client state management | Built-in candidate session lifecycle & seeding |
| Exam Isolation | Silent fallback to JAMB when type is missing | Strict examType validation (400 / 404 hints, zero cross-exam fallback) |
| Monthly Quota | Legacy plan rates | 1,000 Free Credits/mo + Instant top-ups |
Use this cheat-sheet to replace legacy API requests with their Station equivalents:
GET /api/v2/q?subject=chemistrySingle QuestionGET /api/v1/questions?subject=chemistry&limit=1Layer: L1GET /api/v2/m?subject=chemistryBatch Questions (40 fixed)POST /api/v1/assessments/generate (up to 60) or GET /api/v1/questions?limit=15Layer: L1/AssessmentGET /api/v2/q-by-id/:id?subject=chemistryLookup by IDGET /api/v1/questions/:idLayer: L1Not AvailableStep-by-Step Worked SolutionsPOST /api/v1/questions/:id/explainLayer: L3const res = await fetch(
"https://questions.aloc.com.ng/api/v2/q?subject=chemistry&year=2020",
{ headers: { "AccessToken": process.env.ALOC_TOKEN } }
);
const data = await res.json();import { QuestionsApi, Configuration } from "@massteck/aloc-sdk";
const api = new QuestionsApi(new Configuration({ apiKey: process.env.ALOC_API_KEY }));
const { data } = await api.listQuestions({ subject: "chemistry", year: 2020 });
console.log(data[0].text, data[0].metadata?.topic);import requests
res = requests.get(
"https://questions.aloc.com.ng/api/v2/q",
headers={"AccessToken": "YOUR_TOKEN"},
params={"subject": "physics", "type": "utme"}
)from aloc_sdk import AlocClient client = AlocClient(api_key="aloc_live_YOUR_API_KEY") res = client.questions.list_questions(subject="physics", exam_type="jamb") print(res.data[0].text, res.data[0].metadata.topic)
/q & /m AdapterAlready have dozens of React, Vue, Next.js, or Python templates wired to legacy question, singular option, answer, examtype: "utme", and examyear fields? Both official SDKs include a built-in compatibility layer that maps legacy parameters (including routing 40-question /m batches automatically to POST /v1/assessments/generate) and returns the exact legacy JSON shape—while attaching Station L2 metadata under _station.
import { Configuration, fetchLegacyCompat } from "@massteck/aloc-sdk";
const config = new Configuration({ apiKey: process.env.ALOC_API_KEY });
// Single /q call -> { subject, status: 200, data: { question, option, answer, examtype: "utme", _station } }
const single = await fetchLegacyCompat(config, {
subject: "chemistry",
type: "utme",
year: "2020",
});
// 40-item /m batch -> auto-routes to POST /v1/assessments/generate (5 credits)
const paper40 = await fetchLegacyCompat(config, {
subject: "mathematics",
type: "wassce",
count: 40,
});from aloc_sdk import AlocClient client = AlocClient(api_key="aloc_live_YOUR_API_KEY") # Accepts legacy type="utme"|"wassce", string year, and count up to 60 legacy_payload = client.legacy.fetch(subject="physics", type="utme", count=40) first = legacy_payload["data"][0] print(first["question"], first["option"]["a"], first["_station"]["metadata"])
import { NextResponse } from "next/server";
import { Configuration, fetchLegacyCompat } from "@massteck/aloc-sdk";
const config = new Configuration({ apiKey: process.env.ALOC_API_KEY });
export async function GET(req: Request) {
const sp = new URL(req.url).searchParams;
const payload = await fetchLegacyCompat(config, {
subject: sp.get("subject") ?? "mathematics",
type: sp.get("type") ?? sp.get("examtype") ?? undefined,
year: sp.get("year") ?? sp.get("examyear") ?? undefined,
count: sp.get("count") ? Number(sp.get("count")) : undefined,
});
return NextResponse.json(payload);
}npm install @massteck/aloc-sdk or pip install aloc-sdk — or call the REST endpoint directly.