Open Trivia Database website screenshot

Open Trivia Database

The Open Trivia Database (OpenTDB) is a free, user-contributed trivia question database operated by Pixeltail Games LLC. It offers a JSON REST API for retrieving thousands of community-verified trivia questions across 24 categories and three difficulty levels, with optional session tokens to prevent duplicate questions. The service is licensed Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0), is free at the point of use, and enforces a single throttling rule: one request per IP every five seconds.

Open Trivia Database publishes 4 APIs on the APIs.io network, including Categories API, Questions API, Statistics API, and 1 more. Tagged areas include Trivia, Games And Comics, Quiz, Open Data, and Public APIs.

The Open Trivia Database catalog on APIs.io includes 1 JSON-LD context and 2 Spectral governance rulesets.

Open Trivia Database’s developer surface includes documentation, support, tooling, code examples, and 16 more developer resources.

29.6/100 thin ▬ flat Agent 26/100 agent aware saas Full breakdown ↓
scored 2026-09-08 · rubric v0.20.0
4 APIs
TriviaGames And ComicsQuizOpen DataPublic APIsOpen-Source

Kin Score

Kin Score Kin Score How this is scored →
scored 2026-09-08 · rubric v0.20.0
Regulatory Posture applies to this provider. Its tags matched the Government & Public Sector regime, so Regulatory Posture carries 15 points of the composite. If this regime is wrong for your business, say so on your provider repo — the applicability map is public and we will correct it.
Create-or-Update Ergonomics does not apply to this provider. The published contracts declare no write operations, and a read-only API cannot create-or-update. The facet is excluded from this provider's denominator entirely — not scored zero. A reference or data API is not deficient for being unable to upsert.
The six quality facets above are damped to 85 points between them, because the conditional facet above carries the other 15. That is why each facet's contribution is shown against a damped maximum: raising a quality facet moves the composite by 85% of its nominal weight, not 100%. The full arithmetic is at apis.io/rating/.
Improve this rating by publishing the missing artifacts — every area above can be raised, and the full rubric is at apis.io/rating/. Every facet and dimension name above is a link: it opens that measurement's own page — what it means, the exact checks that feed it, how the whole catalog distributes on it, and the providers at the top of it. This rating is computed from github.com/api-evangelist/open-trivia: open an issue to ask a question, or submit a pull request to add artifacts. Submit an artifact on GitHub — free → Manage your own listing — the Influence plan, $499/mo →

APIs 4

Individual APIs this provider publishes, each with its own machine-readable definition.

Open Trivia Database Categories API

Operations for discovering trivia category metadata and counts.

Open Trivia Database Questions API

Operations for retrieving trivia questions from the database.

Open Trivia Database Statistics API

Operations for inspecting overall database statistics.

Open Trivia Database Tokens API

Operations for managing session tokens that prevent duplicate questions.

Open Collections 6

Open, tool-agnostic API collections (OpenAPI-derived and Bruno).

API Collection

OPEN COLLECTION

Open Trivia Database API

OPEN COLLECTION

Rate Limits 1

Documented rate limits and quota policies.

Open Trivia Rate Limits

1 limits

RATE LIMITS

Semantic Vocabularies 1

JSON-LD contexts and semantic vocabularies used across these APIs.

Open Trivia Context

9 classes · 25 properties

JSON-LD

Spectral Rules 2

Spectral governance rulesets for linting and validating these APIs.

Open Trivia Database API Rules

5 rules · 4 warnings 1 info

SPECTRAL

Open Trivia Database API Rules

36 rules · 12 errors 18 warnings 6 info

SPECTRAL

JSON Schema 9

Standalone JSON Schema definitions for this provider's data models.

CategoryCountResponse

2 properties

JSON SCHEMA

CategoryListResponse

1 properties

JSON SCHEMA

CategoryQuestionCount

4 properties

JSON SCHEMA

Category

2 properties

JSON SCHEMA

GlobalCountResponse

2 properties

JSON SCHEMA

GlobalCounts

4 properties

JSON SCHEMA

QuestionResponse

3 properties

JSON SCHEMA

Question

6 properties

JSON SCHEMA

TokenResponse

3 properties

JSON SCHEMA

Scroll for all 9

JSON Structure 9

JSON Structure definitions describing this provider's data shapes.

Open Trivia Category Structure

2 properties

JSON STRUCTURE

Open Trivia Global Counts Structure

4 properties

JSON STRUCTURE

Open Trivia Question Response Structure

3 properties

JSON STRUCTURE

Open Trivia Question Structure

6 properties

JSON STRUCTURE

Open Trivia Token Response Structure

3 properties

JSON STRUCTURE

Scroll for all 9

Examples 9

Example request and response payloads for these APIs.

Scroll for all 9

Security Posture 1

Authentication, domain security, vulnerability disclosure, and trust-center signals.

Open Trivia Domain Security

TLSv1.3 · HSTS

SECURITY

Agentic Access 1

Recommended x-agentic-access execution contracts for AI agents.

Open Trivia Agentic Access

5 operations

5 operations · 0 acting

AGENTIC

Resources

Documentation 1

Reference material describing how the API behaves

Agent Surfaces 1

MCP servers, agent skills, and machine-readable catalogs

Build 11

SDKs, sample code, and the tooling you integrate with

Scroll for all 11

Access & Security 1

Authentication, authorization, and security posture

Operate 1

Status, limits, changes, and where to get help

Commercial 2

Pricing, plans, and the legal terms of use

Company 1

The organization behind the API

Other 2

Properties that don't map to a standard resource type

Source (apis.yml)

apis.yml Raw ↑
aid: open-trivia
name: Open Trivia Database
description: 'The Open Trivia Database (OpenTDB) is a free, user-contributed trivia question database operated by Pixeltail
  Games LLC. It offers a JSON REST API for retrieving thousands of community-verified trivia questions across 24 categories
  and three difficulty levels, with optional session tokens to prevent duplicate questions. The service is licensed Creative
  Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0), is free at the point of use, and enforces a single throttling
  rule: one request per IP every five seconds.'
url: https://opentdb.com/api_config.php
deliveryModel:
  model: saas
  open_source: false
  commercial: true
  callable_host: true
  label: Hosted service · you call their endpoint
  confidence: high
  source:
  - openapi
  - pricing
  generated: '2026-08-28'
  method: derived
accessModel:
  pricing: unknown
  onboarding: unknown
  trial: false
  try_now: false
  public: false
  label: Unknown
  confidence: low
  source: []
  generated: '2026-07-22'
  method: derived
image: https://opentdb.com/images/logo-banner.png
humanURL: https://opentdb.com
baseURL: https://opentdb.com
specificationVersion: '0.23'
created: '2026-05-28'
modified: '2026-05-30'
x-source: public-apis/public-apis
x-artifacts:
  openapi: 1
  jsonSchema: 9
  jsonStructure: 9
  jsonLd: 1
  examples: 9
  capabilities: 4
  rules: 1
  vocabulary: 1
  rateLimits: 1
x-category: Games & Comics
x-type: opensource
x-tier: 3
x-tier-reason: Free public service; user-contributed open database with CC BY-SA 4.0 licensing.
x-license: CC-BY-SA-4.0
x-operator: Pixeltail Games LLC
tags:
- Trivia
- Games And Comics
- Quiz
- Open Data
- Public APIs
- Open-Source
tags_raw:
- Trivia
- Games And Comics
- Quiz
- Open Data
- Public APIs
- Open Source
apis:
- aid: open-trivia:open-trivia-categories-api
  name: Open Trivia Database Categories API
  description: Operations for discovering trivia category metadata and counts.
  humanURL: https://opentdb.com/api_config.php
  baseURL: https://opentdb.com
  tags:
  - Categories
  properties:
  - type: OpenAPI
    url: openapi/open-trivia-categories-api-openapi.yml
  - type: Documentation
    url: https://opentdb.com/api_config.php
  - type: JSONSchema
    url: json-schema/open-trivia-question-schema.json
  - type: JSONSchema
    url: json-schema/open-trivia-category-schema.json
  - type: JSONStructure
    url: json-structure/open-trivia-question-structure.json
  - type: JSONLD
    url: json-ld/open-trivia-context.jsonld
  - type: SpectralRules
    url: rules/open-trivia-rules.yml
  - type: RateLimits
    url: rate-limits/open-trivia-rate-limits.yml
  - type: Vocabulary
    url: vocabulary/open-trivia-vocabulary.yml
  - type: Examples
    url: examples/open-trivia-question-response-example.json
  - type: Signup
    url: https://opentdb.com/api_config.php
  - type: ContributeQuestions
    url: https://opentdb.com/contribute.php
  - type: BrowseQuestions
    url: https://opentdb.com/browse.php
  - type: GameLink
    url: https://opentdb.com/game.php
  - type: Statistics
    url: https://opentdb.com/api_count_global.php
- aid: open-trivia:open-trivia-questions-api
  name: Open Trivia Database Questions API
  description: Operations for retrieving trivia questions from the database.
  humanURL: https://opentdb.com/api_config.php
  baseURL: https://opentdb.com
  tags:
  - Questions
  properties:
  - type: OpenAPI
    url: openapi/open-trivia-questions-api-openapi.yml
  - type: Documentation
    url: https://opentdb.com/api_config.php
  - type: JSONSchema
    url: json-schema/open-trivia-question-schema.json
  - type: JSONSchema
    url: json-schema/open-trivia-category-schema.json
  - type: JSONStructure
    url: json-structure/open-trivia-question-structure.json
  - type: JSONLD
    url: json-ld/open-trivia-context.jsonld
  - type: SpectralRules
    url: rules/open-trivia-rules.yml
  - type: RateLimits
    url: rate-limits/open-trivia-rate-limits.yml
  - type: Vocabulary
    url: vocabulary/open-trivia-vocabulary.yml
  - type: Examples
    url: examples/open-trivia-question-response-example.json
  - type: Signup
    url: https://opentdb.com/api_config.php
  - type: ContributeQuestions
    url: https://opentdb.com/contribute.php
  - type: BrowseQuestions
    url: https://opentdb.com/browse.php
  - type: GameLink
    url: https://opentdb.com/game.php
  - type: Statistics
    url: https://opentdb.com/api_count_global.php
- aid: open-trivia:open-trivia-statistics-api
  name: Open Trivia Database Statistics API
  description: Operations for inspecting overall database statistics.
  humanURL: https://opentdb.com/api_config.php
  baseURL: https://opentdb.com
  tags:
  - Statistics
  properties:
  - type: OpenAPI
    url: openapi/open-trivia-statistics-api-openapi.yml
  - type: Documentation
    url: https://opentdb.com/api_config.php
  - type: JSONSchema
    url: json-schema/open-trivia-question-schema.json
  - type: JSONSchema
    url: json-schema/open-trivia-category-schema.json
  - type: JSONStructure
    url: json-structure/open-trivia-question-structure.json
  - type: JSONLD
    url: json-ld/open-trivia-context.jsonld
  - type: SpectralRules
    url: rules/open-trivia-rules.yml
  - type: RateLimits
    url: rate-limits/open-trivia-rate-limits.yml
  - type: Vocabulary
    url: vocabulary/open-trivia-vocabulary.yml
  - type: Examples
    url: examples/open-trivia-question-response-example.json
  - type: Signup
    url: https://opentdb.com/api_config.php
  - type: ContributeQuestions
    url: https://opentdb.com/contribute.php
  - type: BrowseQuestions
    url: https://opentdb.com/browse.php
  - type: GameLink
    url: https://opentdb.com/game.php
  - type: Statistics
    url: https://opentdb.com/api_count_global.php
- aid: open-trivia:open-trivia-tokens-api
  name: Open Trivia Database Tokens API
  description: Operations for managing session tokens that prevent duplicate questions.
  humanURL: https://opentdb.com/api_config.php
  baseURL: https://opentdb.com
  tags:
  - Tokens
  properties:
  - type: OpenAPI
    url: openapi/open-trivia-tokens-api-openapi.yml
  - type: Documentation
    url: https://opentdb.com/api_config.php
  - type: JSONSchema
    url: json-schema/open-trivia-question-schema.json
  - type: JSONSchema
    url: json-schema/open-trivia-category-schema.json
  - type: JSONStructure
    url: json-structure/open-trivia-question-structure.json
  - type: JSONLD
    url: json-ld/open-trivia-context.jsonld
  - type: SpectralRules
    url: rules/open-trivia-rules.yml
  - type: RateLimits
    url: rate-limits/open-trivia-rate-limits.yml
  - type: Vocabulary
    url: vocabulary/open-trivia-vocabulary.yml
  - type: Examples
    url: examples/open-trivia-question-response-example.json
  - type: Signup
    url: https://opentdb.com/api_config.php
  - type: ContributeQuestions
    url: https://opentdb.com/contribute.php
  - type: BrowseQuestions
    url: https://opentdb.com/browse.php
  - type: GameLink
    url: https://opentdb.com/game.php
  - type: Statistics
    url: https://opentdb.com/api_count_global.php
common:
- type: AgenticAccess
  url: agentic-access/open-trivia-agentic-access.yml
- type: DomainSecurity
  url: security/open-trivia-domain-security.yml
- type: Website
  url: https://opentdb.com
- type: Documentation
  url: https://opentdb.com/api_config.php
- type: Support
  url: https://opentdb.com/contact.php
- type: TermsOfService
  url: https://opentdb.com/terms.php
- type: License
  url: https://creativecommons.org/licenses/by-sa/4.0/
- type: Donate
  url: https://ko-fi.com/pixeltailgames
- type: PublicAPIsListing
  url: https://github.com/public-apis/public-apis
- type: CommunityIntegrations
  title: Community SDKs and Integrations
  url: https://github.com/topics/opentdb
- type: SDKs
  title: Open Trivia DB Wrapper (TypeScript / JavaScript)
  url: https://github.com/Elitezen/open-trivia-db-wrapper
- type: SDKs
  title: Python Trivia API (Python)
  url: https://github.com/MaT1g3R/Python-Trivia-API
- type: SDKs
  title: OpenTDB4j (Java)
  url: https://github.com/crnvl/OpenTDB4j
- type: SDKs
  title: opentdb-api (JavaScript)
  url: https://github.com/blobfysh/opentdb-api
- type: Tools
  title: MCP Server (Community — pipeworx-io)
  url: https://github.com/pipeworx-io/mcp-trivia
- type: Tools
  title: Discord Trivia Bot (Community)
  url: https://github.com/LakeYS/Discord-Trivia-Bot
- type: Tools
  title: OTDB Source Download Script (Community)
  url: https://github.com/QuartzWarrior/OTDB-Source
- type: CodeExamples
  title: Ignite Bowser Trivia App (TypeScript)
  url: https://github.com/robinheinze/ignite-trivia
- type: CodeExamples
  title: React Native Trivia Quiz (JavaScript)
  url: https://github.com/computationalcore/react-native-trivia-quiz
- type: CodeExamples
  title: Vue Quiz App (Vue 3)
  url: https://github.com/supershaneski/vue-quiz-app
maintainers:
- FN: Kin Lane
  email: kin@apievangelist.com

Work with this as data

Every provider here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for providers

9 MCP tools reach this
  • find_providersBrowse and filter every provider in the catalog.
  • get_provider_artifactsEvery artifact this provider publishes, grouped by type.
  • get_provider_operationsEvery operation across all of their OpenAPIs — one call instead of parsing every spec.
  • get_provider_toolsEvery MCP tool they ship, with the operation each wraps.
  • get_provider_evidenceHow each part of their score was established. Free — the basis for a claim should not sit behind it.
  • get_provider_ratingPRO — composite, band, trend and facet scores.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This provider
curl "https://apis.io/api/v1/providers/open-trivia"
All providers
curl "https://apis.io/api/v1/providers?limit=25"
Every operation they expose
curl "https://apis.io/api/v1/providers/open-trivia/operations?limit=25"
How their score was established
curl "https://apis.io/api/v1/providers/open-trivia/evidence"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.