{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF & Document to Markdown: OCR, Tables, Word, Excel",
    "description": "📄 Turn PDFs (also scanned), Word, PowerPoint, Excel, CSV, HTML, EPUB and images into clean Markdown for LLMs and RAG: headings, lists and real tables, OCR in 27 languages, page-aware chunks and tables as data. Pay per page, no subscription.",
    "version": "0.1",
    "x-build-id": "R955GDHtb5xp34kzl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yodeling_november~document-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yodeling_november-document-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/yodeling_november~document-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-yodeling_november-document-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/yodeling_november~document-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-yodeling_november-document-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": {
          "urls": {
            "title": "Document URLs",
            "type": "array",
            "description": "Direct links to the files: PDF (also scanned), Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), CSV, HTML, EPUB, text, or images (PNG, JPG, TIFF, WebP). The file type is detected from its content, so links without an extension work too.",
            "items": {
              "type": "string"
            }
          },
          "files": {
            "title": "Upload files",
            "type": "array",
            "description": "Or upload files from your computer. They are stored in one of your key-value stores and read from there."
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "document",
              "pages",
              "chunks"
            ],
            "type": "string",
            "description": "One row per document (full Markdown), one row per page, or ready-to-embed RAG chunks with page numbers and section headings.",
            "default": "document"
          },
          "includeTables": {
            "title": "Tables as data",
            "type": "boolean",
            "description": "Also return every table as rows of cells (the first row is the header). Tables are always in the Markdown as well.",
            "default": true
          },
          "includePlainText": {
            "title": "Plain text",
            "type": "boolean",
            "description": "Also return the content as plain text, without Markdown marks.",
            "default": false
          },
          "includePages": {
            "title": "Per-page Markdown",
            "type": "boolean",
            "description": "With 'One row per document', also return a list with the Markdown of each page.",
            "default": false
          },
          "pageMarkers": {
            "title": "Page markers",
            "type": "boolean",
            "description": "Put an HTML comment such as <!-- page 3 --> before each page in the Markdown, so you can cite page numbers.",
            "default": false
          },
          "ocr": {
            "title": "OCR",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "Auto reads scanned pages (pages without a usable text layer) and images with OCR. Always runs OCR on every PDF page, for PDFs whose text layer is wrong. Off never runs OCR. OCR pages are billed as 'OCR page'.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages of the scanned text. Pick only the ones you need: each extra language makes OCR slower.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "por",
                "spa",
                "fra",
                "deu",
                "ita",
                "nld",
                "pol",
                "ces",
                "slk",
                "slv",
                "hrv",
                "ron",
                "hun",
                "swe",
                "dan",
                "nor",
                "fin",
                "est",
                "lav",
                "lit",
                "ell",
                "tur",
                "rus",
                "ukr",
                "bul",
                "cat"
              ],
              "enumTitles": [
                "English",
                "Portuguese",
                "Spanish",
                "French",
                "German",
                "Italian",
                "Dutch",
                "Polish",
                "Czech",
                "Slovak",
                "Slovenian",
                "Croatian",
                "Romanian",
                "Hungarian",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Estonian",
                "Latvian",
                "Lithuanian",
                "Greek",
                "Turkish",
                "Russian",
                "Ukrainian",
                "Bulgarian",
                "Catalan"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "maxOcrPagesPerDocument": {
            "title": "Max OCR pages per document",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit of pages read with OCR in one document. Scanned pages over the limit are left empty and reported in 'message'.",
            "default": 200
          },
          "maxPagesPerDocument": {
            "title": "Max pages per document",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Only the first pages (slides, sheets, chapters) up to this number are converted.",
            "default": 1000
          },
          "pdfPassword": {
            "title": "PDF password",
            "type": "string",
            "description": "Password to open protected PDFs. Used for every PDF in the run."
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 50000,
            "type": "integer",
            "description": "With 'RAG chunks': target size of each chunk. 2,000 characters is about 500 tokens. Chunks end on paragraph boundaries.",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 25000,
            "type": "integer",
            "description": "With 'RAG chunks': how much of the end of a chunk is repeated at the start of the next one (whole paragraphs, up to this size).",
            "default": 200
          },
          "includeSlideNotes": {
            "title": "PowerPoint speaker notes",
            "type": "boolean",
            "description": "Include the speaker notes of each slide.",
            "default": true
          },
          "saveMarkdownFiles": {
            "title": "Save .md files",
            "type": "boolean",
            "description": "Also save each document as a .md file in the run's key-value store, with its link in 'markdownFileUrl'. Very long documents are always saved this way.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files are skipped and reported as failed rows.",
            "default": 100
          },
          "timeoutPerDocumentSecs": {
            "title": "Timeout per document (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "A document that takes longer is stopped and reported as a failed row (not billed).",
            "default": 900
          },
          "base64Documents": {
            "title": "Base64 documents (for API calls)",
            "type": "array",
            "description": "Files sent inline, as objects {\"fileName\": \"invoice.pdf\", \"data\": \"<base64>\"} or plain base64 strings."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}