Open Trivia DB — Category Question Count
opentdb.trivia.category_countGet verified trivia question counts by category and difficulty to check availability before requesting questions and avoid empty results.
Instructions
Get the number of verified trivia questions available in a specific category, broken down by difficulty (easy, medium, hard). Useful for checking availability before requesting questions with opentdb.trivia.questions — if you request more questions than exist in a filtered query, the API returns empty results. Example: category 9 (General Knowledge) has ~469 verified questions. Source: opentdb.com — CC BY-SA 4.0, free unlimited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category_id | Yes | Category ID (9–32). Use opentdb.trivia.categories to list all IDs. Examples: 9=General Knowledge, 17=Science & Nature, 21=Sports, 23=History. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |