{"id":13686169,"url":"https://github.com/idoqo/waec","last_synced_at":"2025-04-28T07:30:45.293Z","repository":{"id":117127331,"uuid":"83201244","full_name":"idoqo/waec","owner":"idoqo","description":"Unofficial developer-facing API for WASSCE results.","archived":false,"fork":false,"pushed_at":"2018-12-06T20:12:43.000Z","size":19,"stargazers_count":23,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T07:33:01.203Z","etag":null,"topics":["api","waec","wassce"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idoqo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-26T10:42:57.000Z","updated_at":"2024-05-02T15:15:25.000Z","dependencies_parsed_at":"2024-01-17T06:24:49.823Z","dependency_job_id":"2308c8b9-5616-42bc-83f9-9f8f5dc9e1a9","html_url":"https://github.com/idoqo/waec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoqo%2Fwaec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoqo%2Fwaec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoqo%2Fwaec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoqo%2Fwaec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idoqo","download_url":"https://codeload.github.com/idoqo/waec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251271082,"owners_count":21562487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","waec","wassce"],"created_at":"2024-08-02T15:00:21.217Z","updated_at":"2025-04-28T07:30:44.259Z","avatar_url":"https://github.com/idoqo.png","language":"PHP","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"### Introduction\nThis provides an unofficial API for querying the main WAEC site for results of a candidate.\nIt is possible for it to suddenly break as site's markup is susceptible to random changes though \nyou can always send a PR if I am late to fixing the code to work with such change(s).\n### Installation\nEnsure you have composer installed already, else you could look that up [here](https://getcomposer.org/doc/00-intro.md).\nIn the project's root directory, run `composer update` to install dependencies and `php -S 127.0.0.1:3000` to start the php server listening on port 3000 on the localhost.\n### Fetch Results\nFetches the result of the candidate using the parameters given. Sending HTTP POSTs to `/` and `result` both yields the same response.\n#### Url\n`/`, `result`\n#### Method\n`POST`\n#### Data Parameters\nThe data parameters correspond to the form fields found on the main website. They include:\n##### Required:\n* `ExamNumber=[String]`: String representation of the candidate's examination number.\n* `ExamYear=[Integer]`: Integer representation of the examination year.\n* `ExamType=[String]`: Either `MAY/JUN` OR `NOV/DEV`, representing the examination type.\n* `serial=[String]`: String representation of the Scratch card's serial number.\n* `pin=[String]`: String representation of the Scratch card's PIN.\n\n##### Optional:\nNone.\n#### Response\nAll API response are JSON formatted and three consistent keys viz: `http_code`, `success` and `content`. These keys can be used to deduce\nthe status of the request even before the other keys are analyzed.\n* `http_code=[Integer]`: Valid HTTP code representing the request status.\n* `success=[bool]`: A `true` or `false` response indicating whether we were able to get the results or not.\n* `content`: An embedded json object whose key-value pairs depend on the first two keys.\n\nThe keys in the `content` object depend on whether `http_code` is `200` or not (success or failure) and are explained below:\n##### Success\n* `title=[String]`: Content of the HTML `\u003ctitle\u003e` sent to browsers from the main site. Usually \"WAECDIRECT ONLINE - RESULTS\" for successful checks.\n* `candidate_number=[String]`: String value of the candidate's examination number.\n* `candidate_name=[String]`: String value of the candidate's full name.\n* `exam_type`: String value of the exam type and year combined.\n* `center`: String value of the candidate's examination center.\n* `grades`: An embedded json object whose key-value pairs correspond to the subjects taken by the student and their grade in each of them.\n##### Failure\n* `title=[String]`: Content of the HTML `\u003ctitle\u003e` sent to the browsers from the main site. May or may not be present for failed requests.\n* `error_title=[String]`: Title of the encountered error.\n* `error_message=[String]`: Tad more detailed error message.\n#### Sample Call\nUsing jQuery's ajax method;\n```javascript\n    var candidateInfo = { \"ExamNumber\": \"5078802000\", \"ExamType\": \"MAY/JUN\",\n        \"ExamYear\": \"2015\", \"serial\": \"QWA123456789\", \"pin\": \"9081803423\"\n    };\n    $.ajax({\n        url: \"/result\",\n        dataType: \"json\",\n        data: candidateInfo,\n        type: \"POST\",\n        success: function(response){\n            console.log(response);\n        }\n    });\n```\nOn success, the value of `response` from the above will be such:\n```json\n[\n  {\n    \"http_code\": 200,\n    \"success\": true,\n    \"content\": {\n      \"title\": \"\\r\\n\\tWAECDIRECT ONLINE - RESULTS\\r\\n\",\n      \"candidate_number\": \"AGADA JULIET AMUYINI\",\n      \"candidate_name\": \"5081802023\",\n      \"exam_type\": \"NOV/DEC WASSCE2015\",\n      \"center\": \"Federal Government College, Otobi\",\n      \"grades\": {\n        \"ECONOMICS\": \"B2\",\n        \"GEOGRAPHY\": \"A1\",\n        \"ENGLISH LANGUAGE\": \"A1\",\n        \"FURTHER MATHEMATICS\": \"B3\",\n        \"MATHEMATICS\": \"B2\",\n        \"AGRICULTURAL SCIENCE\": \"A1\",\n        \"BIOLOGY\": \"A1\",\n        \"CHEMISTRY\": \"B3\",\n        \"PHYSICS\": \"A1\"\n      }\n    }\n  }\n]\n```\n\nOn failure, the response will be such (assuming invalid scratch card as the reason for failure):\n```json\n[\n  {\n    \"http_code\": 302,\n    \"success\": false,\n    \"content\": {\n      \"error_message\": \"INVALID SCRATCH CARD DETAIL\",\n      \"error_title\": \"INVALID SCRATCH CARD DETAIL\",\n      \"title\": \"Object moved\"\n    }\n  }\n]\n``` \n\n#### Disclaimer\nI am in no way affiliated to WAEC, Fleet Technologies or Vatebra Technologies!!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidoqo%2Fwaec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidoqo%2Fwaec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidoqo%2Fwaec/lists"}