{
  "openapi": "3.0.1",
  "info": {
    "title": "DOCX to Markdown & Word to Text: XLSX PPTX ODT ODP RTF",
    "description": "Convert Word (DOCX) to Markdown and text, plus XLSX, PPTX, ODT, ODP and RTF to text, Markdown and JSON. RAG chunks with heading paths for LLMs. Headings, lists, Word tables, Excel rows, slide text and speaker notes in document order. Batch up to 50 files from URLs, Google Drive or Dropbox.",
    "version": "0.10",
    "x-build-id": "AB6v4xJlePG4Cq8SF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gochujang~docx-text-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gochujang-docx-text-extractor",
        "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/gochujang~docx-text-extractor/runs": {
      "post": {
        "operationId": "runs-sync-gochujang-docx-text-extractor",
        "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/gochujang~docx-text-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-gochujang-docx-text-extractor",
        "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": {
          "urls": {
            "title": "File URLs",
            "type": "array",
            "description": "List of .docx, .xlsx, .xlsm, .xls, .pptx, .epub, .html, .csv, .tsv, .txt, .md, .json, .odt, .odp or .rtf URLs to download and extract. Supports Google Drive and Dropbox share links.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "url": {
            "title": "Single File URL",
            "type": "string",
            "description": "Single .docx, .xlsx, .xls, .pptx, .epub, .html, .csv, .txt, .odt, .odp or .rtf URL. Used when 'urls' is empty.",
            "default": ""
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "full",
              "summary"
            ],
            "type": "string",
            "description": "full: include all text, paragraphs, tables, and rows. summary: metadata + truncated text only (faster, smaller output).",
            "default": "full"
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Add a `markdown` field with the document in reading order: headings, lists and GFM tables for DOCX, `## Slide N` sections with tables and `> Notes:` for PPTX, `## Sheet` tables for XLSX. Each DOCX/PPTX table also gets `tables[].markdown`. Ignored (dropped) when outputFormat is summary.",
            "default": true
          },
          "maxRowsPerSheet": {
            "title": "Max rows per sheet (Excel)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "For Excel (.xlsx/.xlsm/.xls) and CSV/TSV files: maximum rows to extract per sheet.",
            "default": 1000
          },
          "limit": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum files to process (max 50).",
            "default": 50
          },
          "includeMetadata": {
            "title": "Include Metadata",
            "type": "boolean",
            "description": "Include document metadata: author, created date, last modified date, last modified by. Always included for DOCX files.",
            "default": true
          },
          "urlsText": {
            "title": "File URLs (paste, one per line)",
            "type": "string",
            "description": "Alternative to the URLs list — paste multiple .docx/.xlsx/.xls/.pptx/.epub/.html/.csv/.txt/.odt/.odp/.rtf URLs, one per line. Merged with 'urls' if both provided.",
            "default": ""
          },
          "chunkForRag": {
            "title": "RAG chunks",
            "type": "boolean",
            "description": "Add `chunks[]` for retrieval: each chunk is {index, heading, headingPath, text, charCount}. Chunks follow Markdown headings (never across an H1/H2), slides (PPTX/ODP add `slide`) and sheets (XLSX add `sheet` and repeat the header row in every chunk). Off by default; no extra charge.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum characters per chunk (≈ 4 characters per token). A single spreadsheet row longer than this becomes its own chunk.",
            "default": 1200
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 19900,
            "type": "integer",
            "description": "Characters repeated between consecutive chunks of the same section (XLSX: whole trailing rows that fit). Capped at chunkSize − 100.",
            "default": 120
          },
          "chunkOutput": {
            "title": "Chunk output",
            "enum": [
              "row",
              "rows"
            ],
            "type": "string",
            "description": "row: `chunks[]` on each document row. rows: one dataset row per chunk (document index, url, file_type, chunkIndex, chunkCount plus the chunk fields).",
            "default": "row"
          },
          "changeDetection": {
            "title": "Enable Change Detection",
            "type": "boolean",
            "description": "Compare document content hash against the previous run stored in KVS. Sets content_changed=true and is_new_document=true on each output record. Use with a named Key-Value Store to persist state across runs.",
            "default": false
          },
          "telegramBotToken": {
            "title": "Telegram Bot Token",
            "type": "string",
            "description": "Optional. Telegram bot token (from @BotFather). When changeDetection=true and a document changes, sends a Telegram alert."
          },
          "telegramChatId": {
            "title": "Telegram Chat ID",
            "type": "string",
            "description": "Optional. Telegram chat/channel ID to send alerts to. Required when telegramBotToken is set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}