How It Works
The Kahoot importer connects to Kahoot’s public API and downloads:- Quiz title and description
- All questions and answer choices
- Question images and cover images
- Time limits for each question
- Correct answer information
Importing a Quiz
Find the Kahoot Quiz ID
Navigate to the Kahoot quiz you want to import. The quiz ID is in the URL:Copy this UUID (e.g.,
550e8400-e29b-41d4-a716-446655440000).Use the Import Endpoint
Send a POST request to
/api/v1/quiz/import/{quiz_id} with your authentication token:Wait for Processing
The import process downloads all images and creates the quiz in your account. This may take a few moments depending on the number of images.
What Gets Imported
Questions
- Question text: Sanitized HTML with allowed tags removed
- Answer choices: Up to 4 answer options with correct answer indicators
- Time limit: Converted from milliseconds to seconds
- Images: Downloaded and stored in your ClassQuiz storage
Quiz Metadata
- Title: Cleaned and sanitized
- Description: Falls back to “Description Missing!” if empty
- Cover image: Downloaded if available
- Kahoot ID: Stored for reference (
imported_from_kahoot: true)
Storage Considerations
Imported images count toward your storage quota. Each quiz import checks if you’ve exceeded the
free_storage_limit before processing.- Downloads images from Kahoot’s CDN
- Uploads them to your ClassQuiz storage
- Calculates file hashes asynchronously
- Associates images with the new quiz
Color Assignments
Kahoot answer colors are not preserved. ClassQuiz assigns default colors in order:- Answer 1:
#D6EDC9(light green) - Answer 2:
#B07156(brown) - Answer 3:
#7F7057(dark tan) - Answer 4:
#4E6E58(dark green)
Limitations
- Kahoot polls/surveys: Not supported
- Kahoot puzzles: Not supported
- Video questions: Videos are not imported, only text and images
- Special formatting: Some HTML formatting may be stripped during sanitization
Error Handling
The import may fail with these HTTP status codes:| Status Code | Meaning |
|---|---|
400 | Invalid quiz ID format |
404 | Quiz not found on Kahoot |
409 | Storage limit exceeded |
500 | Kahoot API error |
After Import
The quiz will have:imported_from_kahoot: trueflag in the database- Original
kahoot_idstored for reference - No moderation rating (
mod_rating: null) - Indexed in Meilisearch for search functionality
API Reference
Endpoint:POST /api/v1/quiz/import/{quiz_id}
Authentication: Required (Bearer token)
Path Parameters:
quiz_id(string): The UUID of the Kahoot quiz
Quiz object with all questions and metadata.
Example Response:
Implementation Details
The import process is handled by/classquiz/kahoot_importer/import_quiz.py:49-117:
- Fetches quiz data from
https://create.kahoot.it/rest/kahoots/{quiz_id}/card/?includeKahoot=true - Downloads images asynchronously using
aiohttp - Creates
StorageItementries for each image - Sanitizes all text content with
bleach - Creates the quiz with
imported_from_kahoot: true - Associates all images with the quiz via many-to-many relationship
Searching for Quizzes
Before importing, you can search Kahoot’s public quiz library:https://create.kahoot.it/rest/kahoots/ with your search parameters.