GET
qbreader.org/api/query
Query the QB Reader database for questions.
queryString
: string
default: ""
questionType
: "tossup" | "bonus" | "all"
default: "all"
"tossup"
- only tossups"bonus"
- only bonuses"all"
- both tossups and bonusessearchType
: "question" | "answer" | "all"
default: "all"
"question"
- only search question bodies"answer"
- only search answerlines"all"
- search both question bodies and answerlinesexactPhrase
: boolean
default: false
queryString
is not part of another word.
Using string interpolation, this is equivalent to the regular expression /\b${queryString}\b/
.
ignoreWordOrder
: boolean
default: false
queryString
as a set of keywords that can appear in any order. See
issue #236.
regex
: boolean
default: false
queryString
as a regular expression.
randomize
: boolean
default: false
setName
: string
default: undefined
undefined
then all sets are searched.difficulties
: number | string | number[] | string[]
default: undefined
undefined
then all difficulties are allowed.string
or number
if there is only 1 difficulty.categories
: string | string[]
default: undefined
undefined
then all categories are allowed.string
if there is only 1 category.subcategories
: string | string[]
default: undefined
undefined
then all subcategories are allowed.string
if there is only 1 subcategory."History"
and the "Biology"
and "Chemistry"
subcategories will return no questions.maxReturnLength
: number
default: 25
10000
.
tossupPagination
: number
default: 1
10000 / maxReturnLength
, rounded down.bonusPagination
: number
default: 1
10000 / maxReturnLength
, rounded down.object
with the following properties:
tossups
: object
count
: number
questionArray
: Tossup[]
Tossups
that match the query.
bonuses
: object
count
: number
questionArray
: Bonus[]
Bonuses
that match the query.
queryString
: string
regex
is false
, then regex characters are escaped.