Vietnamese quiz parser API

Read a Vietnamese multiple-choice exam from Word or text ("Câu 1. … A. … B. …") with its answers and export JSON, GIFT, Aiken, Moodle XML or Quizizz CSV.

POSThttps://apibox.io.vn/v1/vn-quiz-parse

Send an exam as a Word file (.docx) or plain text written the usual Vietnamese way: questions start with Câu 1. / Câu 1: (or 1. when no "Câu" is used), options with A. B. … on separate lines or on one line separated by tabs, and true-false statements with a) b) …. The parser follows the 2025 THPT exam structure: PHẦN I multiple choice, PHẦN II true / false statements, PHẦN III short answers, and keeps reading passages ("Đọc đoạn văn sau và trả lời câu hỏi từ 4 đến 5") as groups.

The correct answer is found the way teachers mark it: an underlined option letter, red or highlighted text, a bold letter when the others are not, a * before the letter, an Đáp án: B line under the question, or an answer table at the end (BẢNG ĐÁP ÁN, 1.B 2.C …, a table of numbers and letters, ĐSĐS for true-false). Explanations (Lời giải:, Hướng dẫn giải:) are kept. Images in the Word file come back as data URIs with [img:img1] markers in the text; equations (OMML) are read as plain text.

format converts the result: gift and moodle_xml for Moodle, aiken, quizizz_csv (Quizizz spreadsheet template), kahoot_csv (columns of the Kahoot template) and a generic csv for Google Sheets / Forms add-ons. Warnings list questions without an answer, duplicate numbers or texts and odd option counts. Files are processed in memory and not stored.

Parameters

NameInTypeRequiredDefault
filebodyfilenoThe exam as .docx (or .txt): multipart, raw body or file_base64.
textbodystringnoThe exam as plain text instead of a file.
formatbody|querystringnojsonjson, gift, aiken, moodle_xml, quizizz_csv, kahoot_csv or csv (export returned in output).
imagesbody|querybooleannotruefalse: list images without their data URIs.
time_secondsbody|querynumberno30Time per question for Quizizz / Kahoot exports.

Example

curl -X POST "https://apibox.io.vn/v1/vn-quiz-parse" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Câu 1. Thủ đô của Việt Nam là\nA. TP. Hồ Chí Minh\t*B. Hà Nội\nC. Đà Nẵng\tD. Huế\nCâu 2. 2 + 2 = ?\nA. 3\nB. 4\nC. 5\nD. 6\nĐáp án: B\nLời giải: 2 + 2 = 4."}'

Response

{
  "question_count": 2,
  "by_type": {
    "multiple_choice": 2
  },
  "answered": 2,
  "sections": [
    {
      "index": 0,
      "title": "",
      "type": null
    }
  ],
  "groups": [],
  "warnings": [],
  "answer_keys": [],
  "questions": [
    {
      "number": 1,
      "section": 0,
      "type": "multiple_choice",
      "points": null,
      "stem": "Thủ đô của Việt Nam là",
      "options": [
        {
          "label": "A",
          "text": "TP. Hồ Chí Minh"
        },
        {
          "label": "B",
          "text": "Hà Nội"
        },
        {
          "label": "C",
          "text": "Đà Nẵng"
        },
        {
          "label": "D",
          "text": "Huế"
        }
      ],
      "answer": [
        "B"
      ],
      "answer_text": null,
      "answer_source": "asterisk",
      "explanation": null,
      "group": null
    },
    {
      "number": 2,
      "section": 0,
      "type": "multiple_choice",
      "points": null,
      "stem": "2 + 2 = ?",
      "options": [
        {
          "label": "A",
          "text": "3"
        },
        {
          "label": "B",
          "text": "4"
        },
        {
          "label": "C",
          "text": "5"
        },
        {
          "label": "D",
          "text": "6"
        }
      ],
      "answer": [
        "B"
      ],
      "answer_text": null,
      "answer_source": "answer_line",
      "explanation": "2 + 2 = 4.",
      "group": null
    }
  ]
}

Use cases

  • Import Word exams into an LMS or exam app
  • Turn a teacher’s .docx into Quizizz, Kahoot or Moodle quizzes
  • Check an exam for missing answers before printing
  • Build a question bank from existing Word files

FAQ

How must the correct answer be marked?

Any common way: underlined or red / highlighted option, a "*" before the letter, an "Đáp án: B" line, or an answer table at the end. The first marking style that singles out options in a question is used.

Are old .doc files and MathType equations supported?

Save .doc files as .docx first. Word equations are read as text; MathType objects only come through as their preview image.

Does it handle the 2025 THPT format?

Yes: parts I (4 options), II (true-false statements a–d, answers like ĐSĐS) and III (short answer) are recognised, with numbering restarting in each part.

Related APIs

Start with 1,000 free requests every month. Get free API key →