I'm a recent graduate of Code Institute, a coding bootcamp that takes you from zero coding knowledge to a junior full-stack developer.
The second assessment project tests your competency using JavaScript. Now I won't lie, this project was a big jump from the HTML and CSS project, as JavaScript was my first 'proper' coding language - but it was also massively exciting to learn about the sheer scope of what can be achieved with JavaScript! So for my second project I created The Quiz Arms - a pub-style trivia quiz that utilised an API to provide trivia questions, grouped by their difficulty level. I decided to push myself and use an API to generate my quiz content rather than writing my own questions, because 'no pain, no gain' right? ๐ Which got me thinking - what other free trivia APIs are available? Iโve scoured the internet and have found these 5 APIs for you to try!
Open Trivia DB
๐ API Key Required? - No
๐ฐ Cost - Free
I used the Open Trivia DB for my project and found the documentation to be well-written, a big plus when you're learning something new. This API gives you the option to either create a general knowledge style of quiz or to specify the category. You can also specify the number of questions you would like, the difficulty of the question and whether you want questions to be multiple choice or true/false. Open Trivia DB currently has over 4000 questions and is growing daily thanks to the option to add your own question to the database.
Quiz API
๐ API Key Required? - Yes
๐ฐ Cost - Free option for developers to try.
Quiz API is perfect if you want to create a more technical quiz, with questions covering networking, programming languages, docker, cloud etc. This API also gives you the option to return a set number of questions, difficulty levels and categories. It also has the option to return certain tags - for example, questions with PHP & Laravel tags.
The Trivia API
๐ API Key Required? - No for non-commercial use (An API Key can be obtained for commercial use or to bypass the rate limit)
๐ฐ Cost - Free
The Trivia API features some nice easy-to-follow documentation along with examples of the JSON, which updates to reflect the choices made. With this API you can specify a category, difficulty and number of questions returned. It also features tags, which allow you to select a sub-category and create a super-specific quiz. Something really cool about this API is the option to set a question region - we've all taken part in a quiz at some point that is specific to one area of the world (looking at you America and TV show quizzes!) The question region selector allows you to choose a county code, which then prevents you from receiving questions that are unsuitable to the region you chose.
jService
๐ API Key Required? - No
๐ฐ Cost - Free
jService is a trivia API that utilises over 221,510 questions from the popular US TV show Jeopardy. The API will return the question with a difficulty rating, category, id, and shows airing dates along with the correct answer and question id.
API Ninjas Trivia
๐ API Key Required? - Yes
๐ฐ Cost - Free option along with other paid subscriptions
API Ninjas provide random trivia from a database containing hundreds of thousands of questions and answers about science, literature, philosophy and other fascinating topics. You can specify the category and the number of questions returned. The documentation for this API is a bit on the basic side, however, I liked that they included code examples for several different languages.
So now comes the hard part, choosing one of the APIs and creating a quiz app! And if you'd like to see my second project in all its glory you can find the live site and repo links below. I'd love to know what team name you came up with, my current favourites are Les Quizerables & In Dog Beers, Weโve Only Had One ๐คฃ - feel free to drop them in the comments section below.