Zum Inhalt springen
GET /v1/questions

Trivia questions

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/opentdb-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten 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
…