Open Trivia Database · JSON Structure

Open Trivia Category Count Response Structure

Response returned by /api_count.php.

Type: object Properties: 2 Required: 2
TriviaGames And ComicsQuizOpen DataPublic APIsOpen Source

CategoryCountResponse is a JSON Structure definition published by Open Trivia Database, describing 2 properties, of which 2 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

category_id category_question_count

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/open-trivia/refs/heads/main/json-structure/open-trivia-category-count-response-structure.json",
  "name": "CategoryCountResponse",
  "description": "Response returned by /api_count.php.",
  "type": "object",
  "properties": {
    "category_id": {"type": "int32", "description": "Numeric identifier for the requested category."},
    "category_question_count": {"$ref": "#/definitions/CategoryQuestionCount"}
  },
  "required": ["category_id", "category_question_count"],
  "definitions": {
    "CategoryQuestionCount": {
      "type": "object",
      "properties": {
        "total_question_count": {"type": "int32"},
        "total_easy_question_count": {"type": "int32"},
        "total_medium_question_count": {"type": "int32"},
        "total_hard_question_count": {"type": "int32"}
      },
      "required": [
        "total_question_count",
        "total_easy_question_count",
        "total_medium_question_count",
        "total_hard_question_count"
      ]
    }
  }
}