It's easy! Just send a HTTP GET request to /api/questions and the response will be a JSON array of questions. You don't need an API key.

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, this service is offered as a paid subscription.

The API is in active development and has a number of features on its roadmap.

If you would like to request a feature, please email help@the-trivia-api.com.

You don't need an API key to request questions for noncommercial use. You only need an API key if you want to:

  • Use questions from the API in a commercial application
  • Bypass the rate limit
  • Search for questions
  • Download all questions

For performance reasons we currently limit the amount of questions you can request at one time to 50.

We limit the number of requests you can send from a single IP to 20 requests in a 5 second window. If you pass this limit then you will receive HTTP 429 errors. This is to keep the API available to all. There are 3 HTTP response headers that give information on the rate limit:

  • ratelimit-limit
    - The maximum number of requests you can send in each ratelimit window
  • ratelimit-reset
    - The number of seconds remaining in the current window
  • ratelimit-remaining
    - The number of requests left to send in the current window

If you have a reason to send more requests than this (e.g. you are teaching a course and the students will be accessing the API from the same IP), then email licenses@the-trivia-api.com to be added to the whitelist.

We ask that you please leave a small amount of time between requests - be a considerate scraper!

Sure! Email help@the-trivia-api.com to be added to the mailing list.

The questions come from a range of sources:

All questions are reviewed before being made available through the API.