Naar de inhoud
GET /v1/questions

Trivia questions

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/opentdb-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/opentdb-api/v1/questions" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/opentdb-api/v1/questions", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/opentdb-api/v1/questions");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/opentdb-api/v1/questions",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "count": 10,
        "questions": [
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "In \"Katamari Damacy\", you control a character known as:",
                "difficulty": "easy",
                "correct_answer": "The Prince",
                "incorrect_answers": [
                    "Fujio",
                    "Ichigo ",
                    "Foomin"
                ]
            },
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "In DC comics where does the Green Arrow (Oliver Queen) live?",
                "difficulty": "easy",
                "correct_answer": "Star City",
                "incorrect_answers": [
                    "Central City",
                    "Gotham City",
                    "Metropolis"
                ]
            },
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "When one is \"envious\", they are said to be what color?",
                "difficulty": "easy",
                "correct_answer": "Green",
                "incorrect_answers": [
                    "Red",
                    "Blue",
                    "Yellow"
                ]
            },
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "Who was the 1st President of Mexico?",
                "difficulty": "easy",
                "correct_answer": "Guadalupe Victoria",
                "incorrect_answers": [
                    "Benito Juárez",
                    "Miguel Hidalgo Y Costilla",
                    "Vicente Guerrero"
                ]
            },
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "According to the Book of Genesis in the Old Testament, how many days did it take God to create the world?",
                "difficulty": "easy",
                "correct_answer": "Six",
                "incorrect_answers": [
                    "Seven",
                    "One",
                    "Twelve"
                ]
            },
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "How many letters are there in the English alphabet?",
                "difficulty": "easy",
                "correct_answer": "26",
                "incorrect_answers": [
                    "28",
                    "23",
                    "24"
                ]
            },
            {
                "type": "multiple",
                "category": "General Knowledge",
                "question": "What is the official language of Brazil?",
                "difficulty": "easy",
                "correct_answer": "Portuguese",
                "incorrect_answer
…