Skip to content

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/questionsRandom trivia questions with their answers, optionally by category, difficulty and type.
GET/opentdb/categoriesThe trivia categories and their ids.
GET/opentdb/countHow many questions one category holds, in total and by difficulty.
GET/opentdb/totalsThe size of the trivia database overall and per category, with the review state of its questions.

questions

GET/v1/opentdb/questions

Random trivia questions with their answers, optionally by category, difficulty and type.

scope social:read1 unitpaginated

Parameters

amount
integer
Number of questions, from 1 to 50.
default 5e.g. 2
category
integer
Category id from opentdb/categories, such as 9 for General Knowledge.
difficulty
string
Difficulty of the questions.
easymediumhard
type
string
Multiple choice or true/false questions.
multipleboolean
tunnel
string
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.
proxy
string
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.
profileId
string
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
categorystring
correctAnswerstring
difficultystring
incorrectAnswersstring[]
questionstring
typestring
curl "https://api.hoshime.com/v1/opentdb/questions?amount=2" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/categories

The trivia categories and their ids.

scope social:read1 unitcached 24 hpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
idstring
namestring
curl "https://api.hoshime.com/v1/opentdb/categories" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/count

How many questions one category holds, in total and by difficulty.

scope social:read1 unitcached 1 h

Parameters

category
integer
required
Category id from opentdb/categories, such as 9 for General Knowledge.
e.g. 9
tunnel
string
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.
proxy
string
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.
profileId
string
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
categoryIdstring
easyinteger (int64)
hardinteger (int64)
mediuminteger (int64)
totalinteger (int64)
curl "https://api.hoshime.com/v1/opentdb/count?category=9" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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/totals

The size of the trivia database overall and per category, with the review state of its questions.

scope social:read1 unitcached 6 h

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
categoriesCategoryTally[]
categoryIdstring
pendinginteger (int64)
rejectedinteger (int64)
totalinteger (int64)
verifiedinteger (int64)
pendinginteger (int64)
rejectedinteger (int64)
totalinteger (int64)
verifiedinteger (int64)
curl "https://api.hoshime.com/v1/opentdb/totals" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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
  }
}
esc
↑↓ move↵ open