{
    "openapi": "3.1.0",
    "info": {
        "title": "Theorieprüfung Führerschein · Öffentliche Informationen",
        "version": "1.4.0",
        "termsOfService": "https://theoriepruefung-fuehrerschein.de/daten/#reutilisation",
        "description": "Nur lesend, ohne Schlüssel und ohne Cookie. Öffentliches CORS für GET-Anfragen. Gemeinsames Kontingent für API und MCP: 120 Anfragen pro Minute und IP-Adresse. Bei einer Antwort 429 den Header Retry-After beachten. Ein Änderungsdatum ist keine inhaltliche Prüfung.",
        "contact": {
            "email": "contact@theoriepruefung-fuehrerschein.de"
        }
    },
    "security": [],
    "servers": [
        {
            "url": "https://theoriepruefung-fuehrerschein.de/api/v1"
        }
    ],
    "paths": {
        "/": {
            "get": {
                "operationId": "getCatalogue",
                "summary": "Beschreibung und Links der API",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Technischer Parameter für das Lesen der aktuellen Fassung. Ohne diesen Parameter der HTTP-Weiterleitung 307 auf derselben Domain folgen.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Öffentliches Ergebnis",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Der Weiterleitung zur aktuellen Fassung auf derselben Domain folgen.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Sekunden, die vor einem neuen Versuch zu warten sind.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/facts": {
            "get": {
                "operationId": "searchFacts",
                "summary": "Öffentliche Einträge durchsuchen",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Technischer Parameter für das Lesen der aktuellen Fassung. Ohne diesen Parameter der HTTP-Weiterleitung 307 auf derselben Domain folgen.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "description": "Wörter, die im Titel, im Inhalt oder in den Quellenangaben vorkommen sollen. Akzente und Umlaute werden normalisiert; alle bedeutungstragenden Wörter müssen vorkommen.",
                        "schema": {
                            "type": "string",
                            "maxLength": 300
                        }
                    },
                    {
                        "name": "region",
                        "in": "query",
                        "description": "Im Eintrag angegebenes Gebiet. Die amtlichen Regeln und die Lektionen tragen den Wert „Deutschland“.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "deutschland"
                            ]
                        }
                    },
                    {
                        "name": "kind",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "fact",
                                "expertise",
                                "organization",
                                "offer",
                                "person",
                                "article",
                                "lesson",
                                "page",
                                "tool"
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000,
                            "default": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Öffentliches Ergebnis",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "results",
                                        "total",
                                        "limit",
                                        "offset"
                                    ],
                                    "properties": {
                                        "results": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Fact"
                                            }
                                        },
                                        "total": {
                                            "type": "integer"
                                        },
                                        "limit": {
                                            "type": "integer"
                                        },
                                        "offset": {
                                            "type": "integer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Der Weiterleitung zur aktuellen Fassung auf derselben Domain folgen.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Sekunden, die vor einem neuen Versuch zu warten sind.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/facts/{id}": {
            "get": {
                "operationId": "getFact",
                "summary": "Einen Eintrag mit seiner Herkunft lesen",
                "parameters": [
                    {
                        "name": "po_live",
                        "in": "query",
                        "description": "Technischer Parameter für das Lesen der aktuellen Fassung. Ohne diesen Parameter der HTTP-Weiterleitung 307 auf derselben Domain folgen.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^(?:(?:expertise-)?fait|page|brand|offer|person)-[a-f0-9]{16}$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Öffentliches Ergebnis",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Fact"
                                }
                            }
                        }
                    },
                    "307": {
                        "description": "Der Weiterleitung zur aktuellen Fassung auf derselben Domain folgen.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "405": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Sekunden, die vor einem neuen Versuch zu warten sind.",
                                "schema": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 60
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "Ungültige Anfrage, unbekannter Eintrag, Limit erreicht oder Dienst nicht verfügbar.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Fact": {
                "type": "object",
                "required": [
                    "id",
                    "kind",
                    "title",
                    "text",
                    "url",
                    "regions",
                    "sources"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^(?:(?:expertise-)?fait|page|brand|offer|person)-[a-f0-9]{16}$"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "fact",
                            "expertise",
                            "organization",
                            "offer",
                            "person",
                            "article",
                            "lesson",
                            "page",
                            "tool"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "text": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "regions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "verified_at": {
                        "type": "string",
                        "format": "date"
                    },
                    "effective_from": {
                        "type": "string",
                        "format": "date"
                    },
                    "modified_at": {
                        "type": "string"
                    },
                    "evidence_kind": {
                        "type": "string",
                        "enum": [
                            "product",
                            "method",
                            "declaration",
                            "analysis"
                        ]
                    },
                    "verification_scope": {
                        "type": "string"
                    },
                    "bibliography": {
                        "type": "array",
                        "description": "Literaturangaben, die im Text einer Lektion zitiert werden.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "chapter": {
                        "type": "object",
                        "description": "Das Kapitel des Kurses, zu dem eine Lektion gehört.",
                        "properties": {
                            "number": {
                                "type": "integer"
                            },
                            "title": {
                                "type": "string"
                            }
                        }
                    },
                    "image": {
                        "type": "string",
                        "format": "uri",
                        "description": "Bild einer Lektion: das Vorschaubild ihres Videos, sonst das erste Bild ihres Inhalts."
                    },
                    "video": {
                        "type": "object",
                        "description": "YouTube-Video, das auf der Lektion angezeigt wird, mit den Werten seiner strukturierten Daten. Ohne Transkript.",
                        "properties": {
                            "youtube_id": {
                                "type": "string"
                            },
                            "title": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "embed_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "thumbnail_url": {
                                "type": "string",
                                "format": "uri"
                            },
                            "duration": {
                                "type": "string"
                            },
                            "duration_seconds": {
                                "type": "integer"
                            },
                            "upload_date": {
                                "type": "string"
                            },
                            "chapters": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "start_seconds": {
                                            "type": "integer"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string",
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "organization_data": {
                        "type": "object"
                    },
                    "person_data": {
                        "type": "object"
                    },
                    "offer_data": {
                        "type": "object"
                    },
                    "sources": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "url",
                                "label",
                                "type"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "format": "uri"
                                },
                                "label": {
                                    "type": "string"
                                },
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "official",
                                        "operator",
                                        "brand",
                                        "source"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "externalDocs": {
        "url": "https://theoriepruefung-fuehrerschein.de/daten/api/"
    }
}