{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Quiz Generator",
    "description": "Create source-grounded AI quizzes, flashcards, scenario questions, Moodle XML, Anki CSV, answer keys, and assessment data for any topic or lesson.",
    "version": "1.0",
    "x-build-id": "byKonJR5Db0nOcscE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thescrapelab~Apify-Quiz-Generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thescrapelab-Apify-Quiz-Generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/thescrapelab~Apify-Quiz-Generator/runs": {
      "post": {
        "operationId": "runs-sync-thescrapelab-Apify-Quiz-Generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/thescrapelab~Apify-Quiz-Generator/run-sync": {
      "post": {
        "operationId": "run-sync-thescrapelab-Apify-Quiz-Generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "topic"
        ],
        "properties": {
          "topic": {
            "title": "Topic or Source Title",
            "minLength": 5,
            "maxLength": 300,
            "type": "string",
            "description": "What should the quiz be about? For source-grounded quizzes, use this as the title or short description of the source material.",
            "default": "Basic Python programming concepts"
          },
          "total_questions": {
            "title": "Number of Questions",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many questions to generate. Leave the default for a quick quiz. Maximum is 100.",
            "default": 10
          },
          "difficulty": {
            "title": "Difficulty",
            "enum": [
              "easy",
              "medium",
              "hard"
            ],
            "type": "string",
            "description": "Choose how challenging the quiz should be.",
            "default": "medium"
          },
          "quiz_preset": {
            "title": "Quiz Type",
            "enum": [
              "standard_quiz",
              "classroom_quiz",
              "corporate_training",
              "certification_practice",
              "trivia_game",
              "flashcards",
              "exam_revision"
            ],
            "type": "string",
            "description": "Choose the closest use case. This automatically picks a sensible mix of question types unless you provide custom counts.",
            "default": "standard_quiz"
          },
          "quality_tier": {
            "title": "Quality Level",
            "enum": [
              "standard",
              "premium"
            ],
            "type": "string",
            "description": "Use Standard for most quizzes. Use Premium for specialist, technical, academic, or high-accuracy work. Premium adds a small per-question charge.",
            "default": "standard"
          },
          "source_text": {
            "title": "Paste Source Text",
            "maxLength": 30000,
            "type": "string",
            "description": "Optional lesson notes, article text, policy text, or training material. If provided, the Actor generates questions from this material.",
            "default": ""
          },
          "source_urls": {
            "title": "Source URLs",
            "type": "array",
            "description": "Optional public URLs to use as source material. Best for simple public HTML or text pages.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "audience": {
            "title": "Audience",
            "type": "string",
            "description": "Optional learner group, such as Grade 9 learners, new employees, or cybersecurity beginners.",
            "default": ""
          },
          "learning_objectives": {
            "title": "Learning Objectives",
            "type": "array",
            "description": "Optional objectives to cover. The Actor tags generated questions to relevant objectives where possible.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for generated questions and answers.",
            "default": "English"
          },
          "output_formats": {
            "title": "Extra Export Formats",
            "type": "array",
            "description": "Optional files to save in the key-value store. Dataset output is always produced.",
            "items": {
              "type": "string",
              "enum": [
                "dataset",
                "moodle_xml",
                "anki_csv",
                "summary_json"
              ]
            },
            "default": [
              "dataset"
            ]
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}