{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF Text Extractor & Document Parser: DOCX, XLSX, OCR, Markdown",
    "description": "Parse Word, PowerPoint, Excel and PDF documents into clean Markdown and structured JSON: tables extracted cell-by-cell, document metadata, and RAG-ready chunks with heading paths. Built-in OCR for scans and images.",
    "version": "0.3",
    "x-build-id": "o6xF8tlJEVkHhTAnc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yabanana99~pdf-word-excel-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yabanana99-pdf-word-excel-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/yabanana99~pdf-word-excel-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-yabanana99-pdf-word-excel-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/yabanana99~pdf-word-excel-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-yabanana99-pdf-word-excel-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",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Documents",
            "type": "array",
            "description": "Documents to convert. Each item is an object with exactly one of: <b>url</b> (http/https link to the file), <b>base64</b> (base64-encoded file content, data URIs accepted), or <b>key</b> (record key in a key-value store, with optional <b>store_id</b>). Add an optional <b>filename</b> (e.g. <code>report.pdf</code>) to help format detection when the URL has no extension. Supported formats: PDF, DOCX, PPTX, XLSX, PNG, JPG, TIFF, TXT, CSV, MD, HTML. Up to 500 sources per run.",
            "default": [
              {
                "base64": "JVBERi0xLjcKJcK1wrYKJSBXcml0dGVuIGJ5IE11UERGIDEuMjguMgoKMSAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvSW5mbzw8L1Byb2R1Y2VyKE11UERGIDEuMjguMik+Pj4+CmVuZG9iagoKMiAwIG9iago8PC9UeXBlL1BhZ2VzL0NvdW50IDEvS2lkc1s0IDAgUl0+PgplbmRvYmoKCjMgMCBvYmoKPDwvRm9udDw8L2hlbHYgNSAwIFI+Pj4+CmVuZG9iagoKNCAwIG9iago8PC9UeXBlL1BhZ2UvTWVkaWFCb3hbMCAwIDU5NSA4NDJdL1JvdGF0ZSAwL1Jlc291cmNlcyAzIDAgUi9QYXJlbnQgMiAwIFIvQ29udGVudHNbNiAwIFIgNyAwIFIgOCAwIFIgOSAwIFIgMTAgMCBSIDExIDAgUiAxMiAwIFJdPj4KZW5kb2Jq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k4NUFDMkIxNTY0MkMyPjwwQjY5OTAzRDVBMjE3MTI1QzI2NTIyRkM2QjkxRDNDNj5dPj4Kc3RhcnR4cmVmCjE2MTAKJSVFT0YK",
                "filename": "sample-report.pdf"
              }
            ]
          },
          "output_format": {
            "title": "Output format",
            "enum": [
              "text",
              "markdown",
              "json",
              "all"
            ],
            "type": "string",
            "description": "Which textual representations to include in each dataset record. <b>text</b> = plain text only, <b>markdown</b> = Markdown only, <b>json</b> = structured data only (tables, metadata, chunks), <b>all</b> = everything. Tables, metadata and chunks are controlled by their own options and are always part of the record.",
            "default": "all"
          },
          "ocr": {
            "title": "OCR mode",
            "enum": [
              "auto",
              "force",
              "off"
            ],
            "type": "string",
            "description": "<b>auto</b> runs OCR on pages with almost no extractable text (fewer than 25 characters) and on scanned-looking pages (a raster image covering over 15% of the page with fewer than 200 characters of text), <b>force</b> runs OCR on every page, <b>off</b> disables OCR entirely. Only OCR pages that produce text are charged.",
            "default": "auto"
          },
          "ocr_language": {
            "title": "OCR languages",
            "type": "string",
            "description": "Tesseract language codes joined with <code>+</code>, e.g. <code>eng+ita</code>. The Docker image ships with English, Italian, French, German, Spanish, Portuguese, Dutch and Polish. Requested languages that are not installed are skipped with a warning.",
            "default": "eng+ita"
          },
          "extract_tables": {
            "title": "Extract tables",
            "type": "boolean",
            "description": "Detect tables and include them in the structured <code>tables</code> field as arrays of cell rows. For PDFs this runs a dedicated table-detection pass (pdfplumber).",
            "default": true
          },
          "chunking": {
            "title": "Chunking strategy",
            "enum": [
              "off",
              "by_headings",
              "fixed_tokens"
            ],
            "type": "string",
            "description": "How to split the document into RAG-ready chunks. <b>by_headings</b> splits at Markdown headings and keeps a <code>heading_path</code> per chunk (oversized sections are sub-split), <b>fixed_tokens</b> uses fixed-size token windows with overlap, <b>off</b> disables chunking.",
            "default": "by_headings"
          },
          "chunk_size_tokens": {
            "title": "Chunk size (tokens)",
            "minimum": 32,
            "maximum": 8192,
            "type": "integer",
            "description": "Maximum tokens per chunk (cl100k_base tokenizer). Range 32–8192.",
            "default": 512
          },
          "chunk_overlap_tokens": {
            "title": "Chunk overlap (tokens)",
            "minimum": 0,
            "maximum": 4096,
            "type": "integer",
            "description": "Token overlap between consecutive chunks when a section is sub-split. Capped at half the chunk size.",
            "default": 64
          },
          "max_file_size_mb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Files larger than this are skipped with a warning instead of failing the run.",
            "default": 50
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many documents to process in parallel. Parsing is CPU-bound (Python GIL), so values above 4 mainly pay off on OCR-heavy batches; higher values also use more memory. Range 1–10.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}