MasonMacKinnon.Com

Trivia API Help

This is the help page for the Trivia API, an API for the trivia page which can be used to bring trivia questions from MasonMacKinnon.Com to the rest of the Internet.


Requesting a question

Sending a GET or POST request returns a trivia question in JSON format. By default, a random question is returned, although a specific difficulty or question ID can also be requested.


Specifying a difficulty

The difficulty parameter can be used to specify the requested difficulty according to the following table:


Parameter Value Question Difficulty
easy Easy
medium Medium
hard Hard

Specifying an ID

If a specific question is desired, its ID can be specified using the qid parameter, which must be a positive integer. This parameter will be ignored if difficulty is specified.

Comments

Log in or sign up to leave a comment.