Open Trivia DB website screenshot

Open Trivia DB

The Open Trivia Database provides a completely free JSON API for use in programming projects. Use of this API does not require an API key, just generate the URL and use it in your own application to retrieve trivia questions across multiple categories, difficulties, and types.

1 APIs 0 Features
FreeGamesQuestionsTrivia

APIs

Open Trivia DB

Free JSON trivia question API supporting categories, difficulties, question types, encodings, and optional session tokens to avoid duplicate questions across requests.

Collections

Pricing Plans

Rate Limits

Open Trivia Db Rate Limits

5 limits

RATE LIMITS

FinOps

Resources

🔗
DomainSecurity
DomainSecurity
🔗
Website
Website
🔗
Documentation
Documentation

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Open Trivia DB API
  version: '1.0'
items:
- info:
    name: Questions
    type: folder
  items:
  - info:
      name: Retrieve trivia questions
      type: http
    http:
      method: GET
      url: https://opentdb.com/api.php
      params:
      - name: amount
        value: ''
        type: query
        description: Number of questions to return (1-50).
      - name: category
        value: ''
        type: query
        description: Category ID to filter by. Omit for any category.
      - name: difficulty
        value: ''
        type: query
        description: Question difficulty.
      - name: type
        value: ''
        type: query
        description: Question type.
      - name: encode
        value: ''
        type: query
        description: Response encoding format.
      - name: token
        value: ''
        type: query
        description: Session token to avoid duplicate questions.
    docs: Returns a list of trivia questions filtered by amount, category, difficulty, type, and encoding. Up to 50 questions
      per request.
- info:
    name: Categories
    type: folder
  items:
  - info:
      name: List trivia categories
      type: http
    http:
      method: GET
      url: https://opentdb.com/api_category.php
    docs: Returns all available trivia categories with IDs and names.
  - info:
      name: Question count for category
      type: http
    http:
      method: GET
      url: https://opentdb.com/api_count.php
      params:
      - name: category
        value: ''
        type: query
        description: Category ID.
    docs: Returns the total and remaining question counts for a category.
  - info:
      name: Global question counts
      type: http
    http:
      method: GET
      url: https://opentdb.com/api_count_global.php
    docs: Returns global question counts across all categories.
- info:
    name: Tokens
    type: folder
  items:
  - info:
      name: Manage session tokens
      type: http
    http:
      method: GET
      url: https://opentdb.com/api_token.php
      params:
      - name: command
        value: ''
        type: query
        description: Token operation.
      - name: token
        value: ''
        type: query
        description: Existing token (required when command is reset).
    docs: Request a new session token, reset an existing one, or check token status. Tokens prevent duplicate questions across
      requests for 6 hours of inactivity.
bundled: true