Get Random Questions
Send a GET request to /api/questions
to receive a random array of questions. Available query parameters are outlined in the form below.
[
{
"category": "geography",
"id": "622a1c387cc59eab6f950ac9",
"correctAnswer": "Switzerland",
"incorrectAnswers": [
"Croatia",
"Monaco",
"Liechtenstein"
],
"question": {
"text": "Which of these countries borders Italy?"
},
"tags": [
"geography"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "geography",
"id": "62602d664b176d54800e3c95",
"correctAnswer": "Ireland",
"incorrectAnswers": [
"United Kingdom",
"Australia",
"United States"
],
"question": {
"text": "In which country is the city of Dublin?"
},
"tags": [
"cities",
"europe",
"geography"
],
"type": "text_choice",
"difficulty": "easy",
"regions": [],
"isNiche": false
},
{
"category": "food_and_drink",
"id": "622a1c367cc59eab6f9502df",
"correctAnswer": "Uni ",
"incorrectAnswers": [
"Oni",
"Ani",
"Eni"
],
"question": {
"text": "Sea Urchin Sushi Is Known As What In Japanese?"
},
"tags": [
"food",
"japan",
"food_and_drink"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "622a1c347cc59eab6f94fc23",
"correctAnswer": "\"Stella! Hey, Stella!\"",
"incorrectAnswers": [
"\"I see dead people.\"",
"\"Tell 'em to go out there with all they got and win just one for the Gipper.\"",
"\"Toga! Toga!\""
],
"question": {
"text": "Which of these quotes is from the film 'A Streetcar Named Desire'?"
},
"tags": [
"quotes",
"film",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "food_and_drink",
"id": "622a1c367cc59eab6f9502c0",
"correctAnswer": "Grapefruit ",
"incorrectAnswers": [
"Lemon",
"Blood Orange",
"Orange"
],
"question": {
"text": "What is common name for the fruit Citrus Grandis?"
},
"tags": [
"food_and_drink"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "geography",
"id": "623b57c7fd6c701a9211837c",
"correctAnswer": "Tanzania",
"incorrectAnswers": [
"Cuba",
"Iran",
"Nigeria"
],
"question": {
"text": "In which country would you find the Serengeti National Park?"
},
"tags": [
"geography"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "music",
"id": "622a1c357cc59eab6f94ff70",
"correctAnswer": "Michael Jackson",
"incorrectAnswers": [
"Nicki Minaj",
"Neil Young",
"Eric Clapton"
],
"question": {
"text": "Which American singer, songwriter and dancer released the song 'The Way You Make Me Feel'?"
},
"tags": [
"songs",
"musicians",
"music"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "history",
"id": "646089a9de964ebc39016c6a",
"correctAnswer": "Ziggurat",
"incorrectAnswers": [
"Pyramid",
"Obelisk",
"Sphinx"
],
"question": {
"text": "What is the name of the stepped structure used as a temple by Mesopotamian cultures?"
},
"tags": [
"architecture",
"history",
"buildings",
"religion"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "622a1c347cc59eab6f94f92f",
"correctAnswer": "Blue Velvet",
"incorrectAnswers": [
"Network",
"Alien",
"Apocalypse Now"
],
"question": {
"text": "Which film contains the character 'Frank Booth'?"
},
"tags": [
"film",
"fictitious_characters",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "625fd71bdc0dd3b72da64d23",
"correctAnswer": "2003",
"incorrectAnswers": [
"1997",
"2000",
"2006"
],
"question": {
"text": "Finding Nemo was released in which year?"
},
"tags": [
"film",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
}
]
Get Question
Send a GET request to /api/question/{id}
to receive that question.
[
{
"category": "geography",
"id": "622a1c387cc59eab6f950ac9",
"correctAnswer": "Switzerland",
"incorrectAnswers": [
"Croatia",
"Monaco",
"Liechtenstein"
],
"question": {
"text": "Which of these countries borders Italy?"
},
"tags": [
"geography"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "geography",
"id": "62602d664b176d54800e3c95",
"correctAnswer": "Ireland",
"incorrectAnswers": [
"United Kingdom",
"Australia",
"United States"
],
"question": {
"text": "In which country is the city of Dublin?"
},
"tags": [
"cities",
"europe",
"geography"
],
"type": "text_choice",
"difficulty": "easy",
"regions": [],
"isNiche": false
},
{
"category": "food_and_drink",
"id": "622a1c367cc59eab6f9502df",
"correctAnswer": "Uni ",
"incorrectAnswers": [
"Oni",
"Ani",
"Eni"
],
"question": {
"text": "Sea Urchin Sushi Is Known As What In Japanese?"
},
"tags": [
"food",
"japan",
"food_and_drink"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "622a1c347cc59eab6f94fc23",
"correctAnswer": "\"Stella! Hey, Stella!\"",
"incorrectAnswers": [
"\"I see dead people.\"",
"\"Tell 'em to go out there with all they got and win just one for the Gipper.\"",
"\"Toga! Toga!\""
],
"question": {
"text": "Which of these quotes is from the film 'A Streetcar Named Desire'?"
},
"tags": [
"quotes",
"film",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "food_and_drink",
"id": "622a1c367cc59eab6f9502c0",
"correctAnswer": "Grapefruit ",
"incorrectAnswers": [
"Lemon",
"Blood Orange",
"Orange"
],
"question": {
"text": "What is common name for the fruit Citrus Grandis?"
},
"tags": [
"food_and_drink"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "geography",
"id": "623b57c7fd6c701a9211837c",
"correctAnswer": "Tanzania",
"incorrectAnswers": [
"Cuba",
"Iran",
"Nigeria"
],
"question": {
"text": "In which country would you find the Serengeti National Park?"
},
"tags": [
"geography"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "music",
"id": "622a1c357cc59eab6f94ff70",
"correctAnswer": "Michael Jackson",
"incorrectAnswers": [
"Nicki Minaj",
"Neil Young",
"Eric Clapton"
],
"question": {
"text": "Which American singer, songwriter and dancer released the song 'The Way You Make Me Feel'?"
},
"tags": [
"songs",
"musicians",
"music"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "history",
"id": "646089a9de964ebc39016c6a",
"correctAnswer": "Ziggurat",
"incorrectAnswers": [
"Pyramid",
"Obelisk",
"Sphinx"
],
"question": {
"text": "What is the name of the stepped structure used as a temple by Mesopotamian cultures?"
},
"tags": [
"architecture",
"history",
"buildings",
"religion"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "622a1c347cc59eab6f94f92f",
"correctAnswer": "Blue Velvet",
"incorrectAnswers": [
"Network",
"Alien",
"Apocalypse Now"
],
"question": {
"text": "Which film contains the character 'Frank Booth'?"
},
"tags": [
"film",
"fictitious_characters",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "625fd71bdc0dd3b72da64d23",
"correctAnswer": "2003",
"incorrectAnswers": [
"1997",
"2000",
"2006"
],
"question": {
"text": "Finding Nemo was released in which year?"
},
"tags": [
"film",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
}
]
Search
Send a POST request to /api/questions/search
to search for questions. Unlike the /api/questions
endpoint, this is not random and will return the same questions to every request.
[
{
"category": "geography",
"id": "622a1c387cc59eab6f950ac9",
"correctAnswer": "Switzerland",
"incorrectAnswers": [
"Croatia",
"Monaco",
"Liechtenstein"
],
"question": {
"text": "Which of these countries borders Italy?"
},
"tags": [
"geography"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "geography",
"id": "62602d664b176d54800e3c95",
"correctAnswer": "Ireland",
"incorrectAnswers": [
"United Kingdom",
"Australia",
"United States"
],
"question": {
"text": "In which country is the city of Dublin?"
},
"tags": [
"cities",
"europe",
"geography"
],
"type": "text_choice",
"difficulty": "easy",
"regions": [],
"isNiche": false
},
{
"category": "food_and_drink",
"id": "622a1c367cc59eab6f9502df",
"correctAnswer": "Uni ",
"incorrectAnswers": [
"Oni",
"Ani",
"Eni"
],
"question": {
"text": "Sea Urchin Sushi Is Known As What In Japanese?"
},
"tags": [
"food",
"japan",
"food_and_drink"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "622a1c347cc59eab6f94fc23",
"correctAnswer": "\"Stella! Hey, Stella!\"",
"incorrectAnswers": [
"\"I see dead people.\"",
"\"Tell 'em to go out there with all they got and win just one for the Gipper.\"",
"\"Toga! Toga!\""
],
"question": {
"text": "Which of these quotes is from the film 'A Streetcar Named Desire'?"
},
"tags": [
"quotes",
"film",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "food_and_drink",
"id": "622a1c367cc59eab6f9502c0",
"correctAnswer": "Grapefruit ",
"incorrectAnswers": [
"Lemon",
"Blood Orange",
"Orange"
],
"question": {
"text": "What is common name for the fruit Citrus Grandis?"
},
"tags": [
"food_and_drink"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "geography",
"id": "623b57c7fd6c701a9211837c",
"correctAnswer": "Tanzania",
"incorrectAnswers": [
"Cuba",
"Iran",
"Nigeria"
],
"question": {
"text": "In which country would you find the Serengeti National Park?"
},
"tags": [
"geography"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "music",
"id": "622a1c357cc59eab6f94ff70",
"correctAnswer": "Michael Jackson",
"incorrectAnswers": [
"Nicki Minaj",
"Neil Young",
"Eric Clapton"
],
"question": {
"text": "Which American singer, songwriter and dancer released the song 'The Way You Make Me Feel'?"
},
"tags": [
"songs",
"musicians",
"music"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "history",
"id": "646089a9de964ebc39016c6a",
"correctAnswer": "Ziggurat",
"incorrectAnswers": [
"Pyramid",
"Obelisk",
"Sphinx"
],
"question": {
"text": "What is the name of the stepped structure used as a temple by Mesopotamian cultures?"
},
"tags": [
"architecture",
"history",
"buildings",
"religion"
],
"type": "text_choice",
"difficulty": "medium",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "622a1c347cc59eab6f94f92f",
"correctAnswer": "Blue Velvet",
"incorrectAnswers": [
"Network",
"Alien",
"Apocalypse Now"
],
"question": {
"text": "Which film contains the character 'Frank Booth'?"
},
"tags": [
"film",
"fictitious_characters",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
},
{
"category": "film_and_tv",
"id": "625fd71bdc0dd3b72da64d23",
"correctAnswer": "2003",
"incorrectAnswers": [
"1997",
"2000",
"2006"
],
"question": {
"text": "Finding Nemo was released in which year?"
},
"tags": [
"film",
"film_and_tv"
],
"type": "text_choice",
"difficulty": "hard",
"regions": [],
"isNiche": false
}
]
Create a Quiz
Quizzes are collections of questions (with a user-friendly title) that can be used to give end users a repeatable set of questions to answer.
To create a quiz, send a POST request to /api/quiz
, passing your API key in the x-api-key header, and a request body containing:
- The quiz title in the
title
property - An array of question IDs in the
questionIds
property
The response will contain an ID that you can use to get the quiz.
{
"id": "622a1c3c7cc59eab6f9519ab"
}
Get a Quiz
Quizzes are collections of questions (with a user-friendly title) that can be used to give end users a repeatable set of questions to answer.
To get a quiz, send a GET request to /api/quiz/{id}
. The response will contain the quiz title and all of the questions on the quiz.
{
"id": "someQuizId",
"title": "A fun quiz",
"questions": [
{
"category": "Film & TV",
"correctAnswer": "Marlon Brando",
"difficulty": "hard",
"id": "622a1c347cc59eab6f94f8fb",
"incorrectAnswers": [
"Humphrey Bogart",
"Harrison Ford",
"Robert Shaw"
],
"isNiche": false,
"question": "Which actor played the role of Stanley Kowalski in A Streetcar Named Desire?",
"regions": [],
"tags": [
"acting",
"film",
"film_and_tv"
],
"type": "Multiple Choice"
},
{
"category": "Music",
"correctAnswer": "The Beach Boys",
"difficulty": "hard",
"id": "622a1c397cc59eab6f950d9b",
"incorrectAnswers": [
"Swans",
"Three 6 Mafia",
"The Velvet Underground"
],
"isNiche": false,
"question": "Which band includes 'Dennis Wilson'?",
"regions": [],
"tags": [
"music"
],
"type": "Multiple Choice"
}
]
}
Get All of Your Quizzes
To get all quizzes you have created, send a GET request to /api/quizzes
, including your API key in the x-api-key header. The response will be an array of all of your quizzes.
[
{
"id": "someQuizId",
"title": "A fun quiz",
"numberOfQuestions": 2
},
{
"id": "someOtherQuizId",
"title": "Another quiz",
"questions": 1
}
]
Delete a Quiz
To delete a quiz, send a DELETE request to /api/quiz/{id}
, including your API key in the x-api-key header. The response code will be 204, with no data.
{}
Create a Session
Sessions are used to ensure that you don't receive duplicate questions. To create a session, send a GET request to /api/session
, passing your API key in the x-api-key header.
Once the session has been created, you can request questions from that session by passing the session ID as a query parameter to the getQuestions endpoint, e.g. /api/questions?session=<SESSION_ID>
. Subsequent requests to this endpoint will return different questions. Once all questions have been returned, you will receive no more questions.
You can find information on your session by sendinga GET request to /api/session/<SESSION_ID>
.
{
"remainingQuestions": 9032,
"categories": [],
"difficulty": null,
"id": "s0me_se55ion_k3y",
"tags": [],
"totalQuestions": 9062,
"region": null,
"createdAt": "2022-12-21T08:57:47.480Z",
"updatedAt": "2022-12-21T08:57:47.480Z"
}
Get Categories
Send a GET request to /api/categories
to receive information on the categories of question available to request. The keys of the returned object are the labels for each category, and the values can be sent in the comma-separated categories
query parameter when getting questions.
{
"Arts & Literature": [
"arts",
"literature",
"arts_and_literature"
],
"Film & TV": [
"movies",
"film",
"film_and_tv"
],
"Food & Drink": [
"food_and_drink",
"food",
"drink"
],
"General Knowledge": [
"general_knowledge"
],
"Geography": [
"geography"
],
"History": [
"history"
],
"Music": [
"music"
],
"Science": [
"science"
],
"Society & Culture": [
"society_and_culture",
"society",
"culture"
],
"Sport & Leisure": [
"sport_and_leisure",
"sports",
"sport"
]
}
Get Metadata
Send a GET request to /api/metadata
to receive information on the number of questions in the database and the distribution of questions across categories.
{
"byCategory": {
"General Knowledge": 231,
"Society & Culture": 343,
"History": 477,
"Sport & Leisure": 509,
"Geography": 1269,
"Music": 1119,
"Film & TV": 1271,
"Science": 960,
"Food & Drink": 484,
"Arts & Literature": 858
},
"byState": {
"rejected": 3511,
"approved": 7521,
"pending": 5024
},
"byDifficulty": {
"hard": 4239,
"null": 117,
"easy": 608,
"medium": 2557
},
"lastCreated": "2022-04-19T11:42:20.471+00:00",
"lastReviewed": "2022-04-19T20:57:47.644+00:00"
}
Get Tags
Send a GET request to /api/tags
to receive information on the set of all tags that have been added to questions. Each tag can be passed as a value to the tags
queryParameter of the getQuestions
endpoint, e.g. /api/questions?tags=mountains,medicine
[
"00's",
"1400's",
"1600's",
"1700's",
"1800's",
"1910's",
"1920's",
"1930's",
"1940's",
"1950's",
"1960's",
"1970's",
"1980's",
"1990's",
"2010's",
"academy_awards",
"acronyms",
"acting",
"actors",
"advertising",
"africa",
"albums",
"alcohol",
"american_football",
"anatomy",
"ancient_egypt",
"ancient_greece",
"animals",
"architecture",
"art",
"arts_and_literature",
"asia",
"assassinations",
"astronomy",
"athletics",
"australia",
"baltimore",
"bands",
"baseball",
"basketball",
"batman",
"battles",
"biology",
"birds",
"bodies_of_water",
"boston",
"boxing",
"bridges",
"buddhism",
"bugs",
"buildings",
"business",
"cambodia",
"canada",
"capital_cities",
"cartoons",
"central_america",
"cheese",
"chemistry",
"chicago",
"childrens_literature",
"china",
"christianity",
"christmas",
"cities",
"civil_rights",
"classic_novels",
"classical_music",
"classics",
"cocktails",
"cold_war",
"colours",
"comics",
"computing",
"countries",
"cover_song",
"cricket",
"crime",
"cuba",
"cult_films",
"currency",
"dallas",
"darts",
"dc",
"deserts",
"dinosaurs",
"disney",
"drink",
"drinks",
"empires",
"europe",
"events",
"exploration",
"fantasy",
"fashion",
"fiction",
"fictitious_characters",
"film",
"film_and_tv",
"firsts",
"fish",
"flags",
"food",
"food_and_drink",
"football",
"formula_1",
"france",
"games",
"general_knowledge",
"geography",
"geology",
"germany",
"golf",
"greece",
"halloween",
"harry_potter",
"hinduism",
"history",
"hock",
"hockey",
"horror",
"india",
"initials",
"inventions",
"iran",
"islam",
"islands",
"italy",
"james_bond",
"japan",
"jazz",
"judaism",
"kings",
"kpop",
"lakes",
"language",
"las_vegas",
"leaders",
"literature",
"liverpool",
"logos",
"london",
"lord_of_the_rings",
"lyrics",
"manchester",
"marketing",
"martial_arts",
"marvel",
"mathematics",
"mcu",
"medicine",
"medieval",
"mediterranean",
"meteorology",
"middle_ages",
"mlb",
"mls",
"moldova",
"motoring",
"motown",
"mountains",
"music",
"music_albums",
"musicals",
"musicians",
"mythology",
"names",
"natural_disasters",
"natural_wonders",
"nba",
"nbl",
"new_orleans",
"new_york",
"new_zealand",
"nfl",
"nhl",
"nicknames",
"numbers",
"oceans",
"olympics",
"one_hit_wonders",
"organisations",
"painting",
"paris",
"pastry",
"people",
"philosophy",
"physics",
"places",
"plants",
"politics",
"pop_music",
"presidents",
"previous_names",
"pseudonyms",
"quotes",
"racing",
"rap",
"rap_music",
"records",
"religion",
"revolutions",
"rivers",
"rock_music",
"romans",
"rugby",
"russia",
"salvador_dali",
"scandinavia",
"science",
"science_fiction",
"scientific_discoveries",
"shakespeare",
"soccer",
"society_and_culture",
"songs",
"soundtracks",
"south_america",
"southampton",
"southeast_asia",
"space",
"space_exploration",
"spain",
"sport",
"star_wars",
"statues",
"swimming",
"symbols",
"technology",
"tennis",
"the_ancient_world",
"the_beatles",
"the_human_body",
"the_internet",
"the_middle_east",
"the_netherlands",
"the_simpsons",
"the_solar_system",
"theater",
"tourist_attractions",
"toys",
"traditions",
"translations",
"tv",
"uk",
"ukraine",
"us_states",
"usa",
"video_games",
"vietnam",
"vikings",
"volcanoes",
"wars",
"waterfalls",
"wine",
"words",
"world_cup",
"world_war_1",
"world_war_2",
"young_adult"
]