娯
Open Trivia Database API
4 endpointsEntertainment & BooksGlobalsocial:read4 real examples
Returns trivia questions with answers, trivia categories, question counts per category and overall database totals.
View as Markdown| GET | /opentdb/questions | Random trivia questions with their answers, optionally by category, difficulty and type. |
| GET | /opentdb/categories | The trivia categories and their ids. |
| GET | /opentdb/count | How many questions one category holds, in total and by difficulty. |
| GET | /opentdb/totals | The size of the trivia database overall and per category, with the review state of its questions. |
questions
GET
/v1/opentdb/questionsRandom trivia questions with their answers, optionally by category, difficulty and type.
scope social:read1 unitpaginated
Parameters
amountinteger | Number of questions, from 1 to 50. default 5e.g. 2 |
categoryinteger | Category id from opentdb/categories, such as 9 for General Knowledge. |
difficultystring | Difficulty of the questions.easymediumhard |
typestring | Multiple choice or true/false questions.multipleboolean |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
6 fields
category | string |
correctAnswer | string |
difficulty | string |
incorrectAnswers | string[] |
question | string |
type | string |
curl "https://api.hoshime.com/v1/opentdb/questions?amount=2" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/opentdb/questions?amount=2", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/opentdb/questions?amount=2", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "category": "Animals", "correctAnswer": "Gooty", "difficulty": "hard", "incorrectAnswers": [ "Hopper", "Silver Stripe" ], "question": "Which of the following is another name for the \"Poecilotheria Metallica Tarantula\"?", "type": "multiple" }, { "category": "Entertainment: Board Games", "correctAnswer": "Bishop and Rook", "difficulty": "medium", "incorrectAnswers": [ "Rook and King", "Knight and Bishop" ], "question": "In Chess, the Queen has the combined movement of which two pieces?", "type": "multiple" } ], "meta": { "cached": false, "endpoint": "questions", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "opentdb", "requestId": "req_2Xb9kQ…", "units": 1 } }
categories
GET
/v1/opentdb/categoriesThe trivia categories and their ids.
scope social:read1 unitcached 24 hpaginated
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
2 fields
id | string |
name | string |
curl "https://api.hoshime.com/v1/opentdb/categories" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/opentdb/categories", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/opentdb/categories", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "id": "9", "name": "General Knowledge" }, { "id": "10", "name": "Entertainment: Books" } ], "meta": { "cached": false, "endpoint": "categories", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "opentdb", "requestId": "req_2Xb9kQ…", "units": 1 } }
count
GET
/v1/opentdb/countHow many questions one category holds, in total and by difficulty.
scope social:read1 unitcached 1 h
Parameters
categoryinteger required | Category id from opentdb/categories, such as 9 for General Knowledge. e.g. 9 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
5 fields
categoryId | string |
easy | integer (int64) |
hard | integer (int64) |
medium | integer (int64) |
total | integer (int64) |
curl "https://api.hoshime.com/v1/opentdb/count?category=9" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/opentdb/count?category=9", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/opentdb/count?category=9", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "categoryId": "9", "easy": 215, "hard": 77, "medium": 177, "total": 469 }, "meta": { "cached": false, "endpoint": "count", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "opentdb", "requestId": "req_2Xb9kQ…", "units": 1 } }
totals
GET
/v1/opentdb/totalsThe size of the trivia database overall and per category, with the review state of its questions.
scope social:read1 unitcached 6 h
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
10 fields
categories | CategoryTally[] |
categoryId | string |
pending | integer (int64) |
rejected | integer (int64) |
total | integer (int64) |
verified | integer (int64) |
pending | integer (int64) |
rejected | integer (int64) |
total | integer (int64) |
verified | integer (int64) |
curl "https://api.hoshime.com/v1/opentdb/totals" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/opentdb/totals", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/opentdb/totals", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "categories": [ { "categoryId": "9", "pending": 2865, "rejected": 2102, "total": 5436, "verified": 469 }, { "categoryId": "10", "pending": 290, "rejected": 103, "total": 513, "verified": 120 } ], "pending": 10989, "rejected": 5428, "total": 21699, "verified": 5299 }, "meta": { "cached": false, "endpoint": "totals", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "opentdb", "requestId": "req_2Xb9kQ…", "units": 1 } }