Blog

Trivia questions now come with hints and explanations

Will Fry2 min read

A multiple choice question is usually over the moment you answer it. You find out whether you were right, and you move on to the next one.

Questions from The Trivia API can now come with a bit more either side of that: a hint for when you're stuck, and an explanation for once you've answered.

What's new

Text questions (text_choice and text_input) have two new optional fields:

  • hint is one sentence to show before the player answers, if they ask for help. It points them towards the answer without giving it away.
  • explanation is one or two sentences to show afterwards. It says why the correct answer is right, and often why the others are wrong.

Here's what a question looks like with both:

{
  "category": "geography",
  "id": "623741c0cb85f7ce9e949d86",
  "correctAnswer": "Skopje",
  "incorrectAnswers": ["Yaounde", "Sarajevo", "Belgrade"],
  "question": { "text": "What is the capital city of North Macedonia?" },
  "tags": ["geography"],
  "type": "text_choice",
  "difficulty": "hard",
  "regions": [],
  "isNiche": false,
  "hint": "Mother Teresa was born in this Balkan city, then part of the Ottoman Empire.",
  "explanation": "Skopje is the capital of North Macedonia and lies along the Vardar River."
}

They're on every plan, including the free one, so there's nothing to turn on. They just show up in the response.

A few more examples

A good hint gets you thinking in the right direction. The explanation is where the interesting bit goes:

What line connects points of equal atmospheric pressure? (Isobar)

  • Hint: The unit 'bar' is hiding in it.
  • Explanation: Isobars join points of equal pressure on weather maps; isotherms join equal temperature and isohyets equal rainfall.

Which NASA-ESA spacecraft carried the Huygens lander to Saturn's moon Titan? (Cassini)

  • Hint: Named after an Italian-French astronomer who discovered several of Saturn's moons.
  • Explanation: The Cassini orbiter carried Huygens, which landed on Titan in January 2005.

What chemical element is brimstone synonymous with? (Sulfur)

  • Hint: Volcanic vents smell strongly of it.
  • Explanation: Brimstone is an old name for sulfur, as in "fire and brimstone".

Using them

There's not much to it, but there are two things to get right:

  • Don't show the explanation early. It names the correct answer, so keep it hidden until the player has answered. For text_input questions requested with showAnswer=false, the API leaves the explanation out for you (the hint is still there).
  • Check the field is there first. They're optional, so don't render a "Show hint" button for a question that doesn't have one. They're also English only for now, so requests with a language won't include them.

The API reference has the full details on both fields.

Build with The Trivia API

The docs cover every endpoint, parameter and response. No API key is needed to get started.

License

Information about the Creative Commons license for The Trivia API.

The API and all data returned from it are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Creative Commons License

This means that the API and the questions it returns are free for noncommercial use. If you have somewhere suitable in your app, then please credit the API somewhere discreet — we love having our hard work shared!

If you would like to use the API commercially, or would like enhanced functionality, this service is offered through a paid subscription.

Sign in

Sign in to access your API key and manage your account.

or continue with email