{
  "openapi": "3.0.1",
  "info": {
    "title": "Word, PowerPoint, Excel, EPUB & Email to Markdown + RAG Chunks",
    "description": "Convert DOCX, PPTX, XLSX, CSV, EPUB, HTML and EML files to clean Markdown and RAG chunks with heading paths. Tables to CSV. Offline, no LLM, no API key.",
    "version": "1.0",
    "x-build-id": "HnN43LOeqOcQE3eCW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bongo-seakhoa~office-to-markdown-rag-chunks/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bongo-seakhoa-office-to-markdown-rag-chunks",
        "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/bongo-seakhoa~office-to-markdown-rag-chunks/runs": {
      "post": {
        "operationId": "runs-sync-bongo-seakhoa-office-to-markdown-rag-chunks",
        "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/bongo-seakhoa~office-to-markdown-rag-chunks/run-sync": {
      "post": {
        "operationId": "run-sync-bongo-seakhoa-office-to-markdown-rag-chunks",
        "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",
        "properties": {
          "sources": {
            "title": "File URLs",
            "type": "array",
            "description": "Direct links (http or https) to the files to convert. Only public internet addresses are fetched. The format is detected from the file's content, not its name. A link that returns a web page (a viewer or a sign-in page) is converted as HTML and charged: use direct download links, or remove HTML from the formats below.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keyValueStoreId": {
            "title": "Key-value store with files (optional)",
            "type": "string",
            "description": "Pick a key-value store that holds your files (upload them in Apify Console under Storage). Without record keys below, every record whose key ends in a supported extension (.docx, .pptx, .xlsx, .xls, .ods, .csv, .tsv, .epub, .html, .eml ...) or has a matching content type is converted, up to 1,000."
          },
          "keyValueStoreKeys": {
            "title": "Record keys (optional)",
            "type": "array",
            "description": "Keys of the records to convert from the store picked above. Leave empty to use every supported record.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "convert",
              "estimate"
            ],
            "type": "string",
            "description": "'convert' produces Markdown, chunks and tables. 'estimate' reads every file, counts the documents that would be charged (email attachments included) and shows the projected price, without writing outputs. It reads at most 100 files per run, each for at most 30 seconds, and charges none of this Actor's events (Apify's standard Actor start fee still applies).",
            "default": "convert"
          },
          "outputs": {
            "title": "Outputs",
            "type": "array",
            "description": "Which outputs to produce. Markdown goes to the document row and to a .md file; chunks become their own rows; tables and sheets become table rows plus one CSV file each. Per document, at most 500 chunk rows and 30 tables or sheets are written as rows and CSV files; everything is in the Markdown.",
            "items": {
              "type": "string",
              "enum": [
                "markdown",
                "chunks",
                "tables_csv"
              ],
              "enumTitles": [
                "Markdown",
                "RAG chunks",
                "Tables and sheets (CSV)"
              ]
            },
            "default": [
              "markdown",
              "chunks",
              "tables_csv"
            ]
          },
          "formats": {
            "title": "Formats to convert",
            "type": "array",
            "description": "Only files of these formats are converted; others fail with UNSUPPORTED_FORMAT and are not charged. Also limits which email attachments are converted.",
            "items": {
              "type": "string",
              "enum": [
                "docx",
                "pptx",
                "xlsx",
                "xls",
                "ods",
                "csv",
                "epub",
                "html",
                "eml"
              ],
              "enumTitles": [
                "Word (DOCX, DOCM)",
                "PowerPoint (PPTX)",
                "Excel (XLSX, XLSM)",
                "Excel 97-2003 (XLS)",
                "OpenDocument spreadsheet (ODS)",
                "CSV and TSV",
                "EPUB",
                "HTML",
                "Email (EML)"
              ]
            },
            "default": [
              "docx",
              "pptx",
              "xlsx",
              "xls",
              "ods",
              "csv",
              "epub",
              "html",
              "eml"
            ]
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum characters per RAG chunk. Chunks follow headings, paragraphs and table rows, and a chunk inside a long table repeats the table's header row in table_header.",
            "default": 1500
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Characters repeated from the end of the previous chunk, at most half the chunk size. No overlap is added across a heading.",
            "default": 150
          },
          "includeSpeakerNotes": {
            "title": "Include PowerPoint speaker notes",
            "type": "boolean",
            "description": "Adds each slide's speaker notes as a 'Notes:' block after the slide's content.",
            "default": true
          },
          "maxRowsPerSheetMarkdown": {
            "title": "Rows per sheet in the Markdown",
            "minimum": 10,
            "maximum": 20000,
            "type": "integer",
            "description": "A sheet's Markdown table shows at most this many rows; the CSV file always has every row.",
            "default": 1000
          },
          "schemaSummary": {
            "title": "Schema summary per sheet",
            "type": "boolean",
            "description": "Starts each sheet with its columns: inferred type (int, float, date, bool, text), share of empty cells, distinct values over the first 10,000 rows, and 3 sample values.",
            "default": true
          },
          "headerRow": {
            "title": "Header row",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Which row of a sheet's used range holds the column names (1 = the first row). Rows above it are kept as text. 0 means the sheet has no header row: columns are named column_1, column_2 ...",
            "default": 1
          },
          "skipHiddenSheets": {
            "title": "Skip hidden sheets",
            "type": "boolean",
            "description": "Hidden sheets are listed with a placeholder but not converted. Untick to convert them too.",
            "default": true
          },
          "convertEmailAttachments": {
            "title": "Convert email attachments",
            "type": "boolean",
            "description": "Attachments of an EML file in a supported format become their own document rows (one level deep), each charged as a document. PDF attachments are listed, not converted.",
            "default": true
          },
          "maxAttachmentsPerEmail": {
            "title": "Attachments converted per email",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "At most this many attachments of one email are converted; the rest are listed.",
            "default": 20
          },
          "maxFileSizeMb": {
            "title": "Maximum file size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files fail with FILE_TOO_LARGE and are not charged. The limit is also capped at a quarter of the run's memory.",
            "default": 100
          },
          "perFileTimeoutSecs": {
            "title": "Time limit per file",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "A file still converting after this time fails with TIMEOUT and is not charged. An email's attachments share their email's limit. Estimate mode uses at most 30 seconds.",
            "default": 120
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}