The API documentation for QB Reader.
Base URL: https://www.qbreader.org/api
The base URL for the multiplayer API is qbreader.org/api/multiplayer
(Note: There is only one multiplayer API endpoint.)
You can find the python wrapper module for the API here: https://github.com/qbreader/python-module.
New rooms are created on the server when a WebSocket connection is established.
GET requests should always have parameters passed through the URI, and POST requests should have parameters passed through the body.
The API is rate-limited to 20 requests per second.
qbreader.org/api/check-answer
answerline
- the answerline of the question.
Preferably including the html tags <b>
and <u>
, if they are present.
givenAnswer
- the answer the user gave.
[directive, directedPrompt]
[ "prompt", "of what status?" ]
[ "accept", null ]
directive
either equals accept
, reject
, or prompt
directedPrompt
equals a string if there is a directed prompt, and null
otherwise
qbreader.org/api/num-packets
setName
- the name of the set (URI-encoded).
23
404 Not Found
status and a response
of 0
qbreader.org/api/packet
setName
- the name of the set (URI-encoded).
packetNumber
- the number of the packet in the set, starting from 1.
{ tossups: [{}, ...], bonuses: [{}, ...] }
qbreader.org/api/packet-bonuses
/api/packet
setName
- the name of the set (URI-encoded).packetNumber
- the number of the packet in the set, starting from 1. { tossups: [], bonuses: [{}, ...] }
404 Not Found
status and an (empty)
packet that equals { tossups: [], bonuses: [] }
qbreader.org/api/packet-tossups
/api/packet
setName
- the name of the set (URI-encoded).packetNumber
- the number of the packet in the set, starting from 1. { tossups: [{}, ...], bonuses: [] }
404 Not Found
status and an (empty)
packet that equals { tossups: [], bonuses: [] }
qbreader.org/api/query
questionType
- a string that either equals "tossup", "bonus", or "all".
Otherwise, returns a 400 Bad Request
response.
searchType
- a string that either equals "question", "answer", or "all".
Otherwise, returns a 400 Bad Request
response.
queryString
- a string that the query is searching for.
regex
- a boolean that indicates whether queryString
should be treated as a regular expression.
false
.randomize
- a boolean that indicates whether the results should
be in random order.
false
.setName
- a string that is the name of the set to search in.
difficulties
- an array of numbers representing the valid
possible difficulties.
categories
- an array of strings that contain the allowed
categories.
subcategories
- an array of strings that contain the allowed
subcategories.
maxReturnLength
- a number that specifies the maximum number
of questions to return
qbreader.org/api/random-name
amiable-emu
qbreader.org/api/random-question
questionType
- a string that either equals "tossup" or "bonus".
Otherwise, returns a 400 Bad Request
response.
difficulties
- an array of numbers representing the valid
possible difficulties.
categories
- an array of strings that contain the allowed
categories.
subcategories
- an array of strings that contain the allowed
subcategories.
number
- a number that specifies how many questions to return
(the length of the return array).
minYear
- a number (default: 2010)
maxYear
- a number (default: 2023)
404 Not Found
status.qbreader.org/api/report-question
_id
- the id of the question being reported.reason
- the reason why the question is being reported.description
- a description of the problem.qbreader.org/api/set-list
qbreader.org/api/multiplayer/room-list
[number of players, number of active players]
.