extract_office_markdown — Extract Token-Minimal Markdown from .docx, .pptx, or .xlsx

Auto-detects .docx, .pptx, or .xlsx from OOXML structure and converts headings, lists, Word/PowerPoint tables, numerically ordered slides, speaker notes, and sparse Excel worksheets into compact GitHub-Flavored Markdown with token-savings telemetry.

Why buy vs. DIY: Saves 80-95% of context window tokens vs raw OOXML dumps and handles Excel sharedStrings.xml + sparse cell coordinates (A1, D5) without external libraries.

Pricing: $0.002 USD per Office document extraction (.docx, .pptx, or .xlsx) (x402 instant micropayment) · REST: POST https://office-template.apikeg.com/v1/extract-office-markdown · MCP: https://office-template.apikeg.com/mcp

Input Parameters

FieldTypeRequired / DefaultDescription & Constraints
fileBase64 string Required Base64-encoded .docx, .pptx, or .xlsx OOXML file to convert into token-minimal Markdown. (minLength: 16)
includeSpeakerNotes boolean Default: true Include speaker notes from ppt/notesSlides/notesSlide*.xml when extracting .pptx presentations.
maxRowsPerSheet integer Default: 500 Maximum non-empty rows emitted per .xlsx worksheet. (min: 1, max: 5000)

REST Example (curl)

curl -X POST "https://office-template.apikeg.com/v1/extract-office-markdown" \
  -H "Content-Type: application/json" \
  -d '{
  "fileBase64": "UEsDBBQAAAAIA...",
  "includeSpeakerNotes": true,
  "maxRowsPerSheet": 500
}'

MCP tools/call Payload

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "extract_office_markdown",
    "arguments": {
      "fileBase64": "UEsDBBQAAAAIA...",
      "includeSpeakerNotes": true,
      "maxRowsPerSheet": 500
    }
  }
}