{
  "openapi": "3.0.1",
  "info": {
    "title": "Office Docs to Markdown: DOCX, PPTX, XLSX, ODT & EPUB",
    "description": "Convert DOCX, PPTX, XLSX, ODT/ODS/ODP and EPUB files to Markdown or text with tables, metadata and RAG chunks. $2.50 per 1,000 documents; failed files are free.",
    "version": "0.1",
    "x-build-id": "QzZ2GOGsoaJSQ3WCc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ataism~docs-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ataism-docs-to-markdown",
        "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/ataism~docs-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-ataism-docs-to-markdown",
        "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/ataism~docs-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-ataism-docs-to-markdown",
        "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": {
          "files": {
            "title": "File URLs",
            "type": "array",
            "description": "Direct http(s) links to document files, one per entry, e.g. [\"https://example.org/report.docx\"]. Each file becomes one row. Costs $0.0025 per document converted (status ok, also when cut by a cap); empty, encrypted and failed files are free. The format is read from the file's bytes, not its name. Private, local and internal addresses are blocked, robots.txt is respected. At most 1,000 files per run (together with key-value store records). For a file on your computer, use Uploaded files or a key-value store.",
            "items": {
              "type": "string"
            }
          },
          "uploadedFiles": {
            "title": "Uploaded files",
            "type": "array",
            "description": "Optional. Files uploaded from your computer (the Console editor stores them in a key-value store and passes their record URLs), or pasted record URLs, e.g. [{\"url\": \"https://api.apify.com/v2/key-value-stores/STORE_ID/records/report.docx\"}]. Same price and limits as File URLs. The Actor reads each file once and stores nothing."
          },
          "keyValueStoreId": {
            "title": "Key-value store",
            "type": "string",
            "description": "Optional. Pick one of your own key-value stores; the Actor gets read access to that store only (works with Limited permissions). Every record whose key ends in a supported extension (.docx, .pptx, .xlsx, .odt, .ods, .odp, .epub and variants) is converted, unless you list keys below. Same price and limits as File URLs."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Optional. Only these record keys of the chosen key-value store, e.g. [\"contract-2025-01.docx\"]. Empty: every record with a supported file extension (up to the 1,000-file limit).",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "text"
            ],
            "type": "string",
            "description": "markdown (default): headings, lists, bold/italic, links and tables as Markdown, with <!-- page N --> / <!-- slide N --> / <!-- sheet N --> / <!-- chapter N --> markers and --- between them, in the \"markdown\" field. text: plain text in the \"text\" field (tables as tab-separated lines). No change to price.",
            "default": "markdown"
          },
          "chunkForRag": {
            "title": "Split into chunks for RAG",
            "type": "boolean",
            "description": "true: add a \"chunks\" array (about Chunk size characters each, cut at paragraph, line, sentence or word boundaries, with page/slide/sheet numbers for citations), same shape as PDF to Text. false (default): no chunks. No extra charge.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Target chunk length in characters, e.g. 1000. Default 1000, minimum 200, maximum 20,000. Only used when Split into chunks is on.",
            "default": 1000
          },
          "overlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Characters repeated at the start of the next chunk, e.g. 150. Default 100, maximum 10,000; capped below half the chunk size. Only used when Split into chunks is on.",
            "default": 100
          },
          "includeTables": {
            "title": "Include tables",
            "type": "boolean",
            "description": "true (default): tables in documents, slides and e-books are kept (Markdown tables, or tab-separated lines in text output). false: they are left out. Spreadsheet sheets (XLSX, ODS) are tables and are always kept. No change to price.",
            "default": true
          },
          "includeNotes": {
            "title": "Include speaker notes",
            "type": "boolean",
            "description": "true: add the speaker notes of each slide (PPTX, ODP) under the slide. false (default): slides only. No change to price.",
            "default": false
          },
          "maxPages": {
            "title": "Max pages (DOCX, ODT) or chapters (EPUB)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Convert at most this many pages of a DOCX/ODT or chapters of an EPUB, e.g. 50. Default 200, maximum 2,000. Pages come from the page breaks saved in the file (Word and LibreOffice save where each page ended); a file without them counts as one page. Cut documents are marked \"truncated\": true and are charged once. The price is per document.",
            "default": 200
          },
          "maxSlides": {
            "title": "Max slides (PPTX, ODP)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Convert at most this many slides per presentation, e.g. 30. Default 200, maximum 1,000. The price is per document.",
            "default": 200
          },
          "maxSheets": {
            "title": "Max sheets (XLSX, ODS)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Convert at most this many sheets per workbook, in tab order, e.g. 5. Default 20, maximum 200. The price is per document.",
            "default": 20
          },
          "maxRows": {
            "title": "Max rows per sheet",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Keep at most this many non-empty rows of each sheet, e.g. 1000. Default 10,000, maximum 50,000; the rest of the sheet is not read. Each document's output is also capped at about 3 million characters (1.5 million with chunks) to fit a 9 MB dataset item. The price is per document.",
            "default": 10000
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Largest file to read, in MB, e.g. 20. Larger files are skipped with a free error row. Default 50, maximum 100. The run memory also sets a limit: 61 MB at 512 MB with 2 parallel files (92 MB with 1), 100 MB from 1,024 MB.",
            "default": 50
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Time allowed to download each file, including redirects, e.g. 60. Waiting for a site's Crawl-delay is not counted. Default 60, minimum 5, maximum 300. Files that time out are free error rows.",
            "default": 60
          },
          "concurrency": {
            "title": "Parallel files",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "How many files are downloaded at once, e.g. 2. Default 2, minimum 1, maximum 4. At most 2 at a time from one host. Conversion runs in 1 worker below 1 GB of run memory.",
            "default": 2
          },
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "Internal: \"selfTest\" runs the maintainer health check and saves no items. Leave as \"run\" (the default).",
            "default": "run"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}