WAEC Results API

An unofficial REST API for querying WAEC (West African Examinations Council) student results from waecdirect.org.

Features

  • REST API endpoints for submitting student information
  • Web scraping integration with WAEC Direct website
  • Form validation and error handling
  • JSON response format for easy integration

API Endpoints

POST /api/results

Submit student information to retrieve WAEC results.

Request Body:

{ "examNumber": "string", "examYear": "string", "examType": "string", "cardPin": "string" }

Response:

{ "success": true, "data": { "studentInfo": {...}, "results": [...] } }

Project Structure

├── backend/
│   ├── index.ts           # Main API server
│   ├── routes/
│   │   └── results.ts     # WAEC results endpoints
│   └── services/
│       └── waec-scraper.ts # Web scraping logic
├── frontend/
│   ├── index.html         # Test form interface
│   └── app.js            # Frontend JavaScript
└── shared/
    └── types.ts          # Shared TypeScript types

Usage

  1. Start the server (automatically handled by Val Town)
  2. Submit POST requests to /api/results with student information
  3. Receive parsed WAEC results in JSON format

Note

This is an unofficial API and is not affiliated with WAEC. Use responsibly and in accordance with WAEC's terms of service.