{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF & Document to Markdown (LLM / RAG ready)",
    "description": "Convert PDF (including scanned and password-protected), Word, PowerPoint, Excel and HTML documents from URLs into clean Markdown or plain text with headings, tables, metadata and optional RAG chunks.",
    "version": "1.0",
    "x-build-id": "jYVlVf1WCpoGayzuQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/prometheus-maker~pdf-document-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-prometheus-maker-pdf-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/prometheus-maker~pdf-document-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-prometheus-maker-pdf-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/prometheus-maker~pdf-document-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-prometheus-maker-pdf-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Document URLs",
            "type": "array",
            "description": "Direct links to PDF, DOCX, PPTX, XLSX, HTML, CSV or EPUB files. The file type is detected automatically.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "markdown",
              "text",
              "both"
            ],
            "type": "string",
            "description": "Markdown keeps headings, lists and tables. Text is plain reading-order text.",
            "default": "markdown"
          },
          "chunkSize": {
            "title": "Chunk size for RAG (characters)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "If set, also split the Markdown into chunks of about this many characters on paragraph boundaries. Each chunk lists the headings it sits under. 0 = no chunks.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Characters repeated from the end of one chunk at the start of the next.",
            "default": 0
          },
          "pageRange": {
            "title": "PDF page range",
            "type": "string",
            "description": "Only convert these pages, e.g. \"1-5,8,10-\". Empty = all pages."
          },
          "pdfPassword": {
            "title": "PDF password",
            "type": "string",
            "description": "For password-protected PDFs. Used for every PDF in this run and stored encrypted. Leave empty for normal files."
          },
          "maxPagesPerDocument": {
            "title": "Max pages per PDF",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on pages converted per PDF (0 = no cap). You pay per page, so this also caps cost.",
            "default": 0
          },
          "ocrMode": {
            "title": "OCR for scanned pages",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "Auto: OCR only pages that have no text layer (scans, photos). Always: OCR every page. Off: never. OCR pages are billed separately.",
            "default": "auto"
          },
          "ocrLanguages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Languages present in the scanned documents. More languages are slower.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "deu",
                "fra",
                "spa",
                "ita",
                "por",
                "nld",
                "pol",
                "rus",
                "ukr",
                "ces",
                "slk",
                "hun",
                "ron",
                "bul",
                "hrv",
                "srp",
                "slv",
                "ell",
                "tur",
                "swe",
                "dan",
                "nor",
                "fin",
                "est",
                "lav",
                "lit",
                "cat",
                "ara",
                "heb",
                "fas",
                "hin",
                "ben",
                "tha",
                "vie",
                "ind",
                "msa",
                "jpn",
                "kor",
                "chi_sim",
                "chi_tra"
              ],
              "enumTitles": [
                "English",
                "German",
                "French",
                "Spanish",
                "Italian",
                "Portuguese",
                "Dutch",
                "Polish",
                "Russian",
                "Ukrainian",
                "Czech",
                "Slovak",
                "Hungarian",
                "Romanian",
                "Bulgarian",
                "Croatian",
                "Serbian (Cyrillic)",
                "Slovenian",
                "Greek",
                "Turkish",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Estonian",
                "Latvian",
                "Lithuanian",
                "Catalan",
                "Arabic",
                "Hebrew",
                "Persian",
                "Hindi",
                "Bengali",
                "Thai",
                "Vietnamese",
                "Indonesian",
                "Malay",
                "Japanese",
                "Korean",
                "Chinese (Simplified)",
                "Chinese (Traditional)"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "extractTables": {
            "title": "Detect tables in PDFs",
            "type": "boolean",
            "description": "Render ruled tables as Markdown tables.",
            "default": true
          },
          "includeTablesJson": {
            "title": "Also output tables as JSON",
            "type": "boolean",
            "description": "Add a 'tables' field with each detected PDF table as rows of cells.",
            "default": false
          },
          "removeHeadersFooters": {
            "title": "Remove running headers, footers and page numbers",
            "type": "boolean",
            "description": "Drops lines that repeat at the top or bottom of most pages (running titles, page numbers), so they don't break up the text.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many files to download and convert at once. Higher is faster but uses more memory.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}