Wiki Quiz

An attempt to use NLP for creating questions using Wikipedia articles

API endpoints

Following endpoints are open to use

Quiz creator


Generates a quiz from some Wikipedia article name. Following options can be added:

name type description
topics required Name of the article/topic to get data from
limit optional Limit the number of questions
options optional Number of options for MCQs
fill_blanks optional (boolean) Include fill in the blanks questions

Wikipedia article search


Returns Wikipedia search results in a structured way. Following options can be added:

name type description
search required Search query string

What is it?

This is an API that can be used to create multiple choice/fill in the blanks type quiz using Wikipedia articles. It uses NLP and certain heuristics to create questions. Currently the questions generator works well with Wikipedia articles because of the way these articles are written.

Technologies used?

This project uses spaCy which is a powerful NLP library built on Python. NER(Named Entity Recognition) feature of spaCy is extensively used in the generation process.

The API is built on Flask as of now.

Why does this exist?

I wanted to create a quiz app based on Wikipedia, since I couldn't find any API that did this, I decided to try building it myself. I am new to NLP and ML in general, hence this project has a long way to go.


This project runs on Heroku's free tier. Hence the computational limitations don't allow it to produce higher accuracy results or process very large Wikipedia articles. Also, the API goes to sleep when inactive.