{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF, DOCX & PPTX to Markdown Converter for AI & RAG",
    "description": "PDF to Markdown, DOCX to Markdown and PPTX to Markdown converter for AI and RAG: turns PDF, Word, PowerPoint and HTML files into clean Markdown with tables kept as Markdown tables, page and slide numbers, metadata and optional RAG chunks. Optional OCR for scanned PDFs. URLs or file upload.",
    "version": "0.1",
    "x-build-id": "rZdie7QEGHlqsLwsn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fedsignals~documents-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fedsignals-documents-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/fedsignals~documents-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-fedsignals-documents-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/fedsignals~documents-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-fedsignals-documents-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": "Returns one Markdown document row per link (plus chunk rows if chunking is on). Public links to PDF, DOCX, PPTX or HTML files (one per line). The file type is detected from the content, so URLs without an extension work too. A key from this run's default key-value store also works.",
            "items": {
              "type": "string"
            }
          },
          "fileUrl": {
            "title": "Or upload a file",
            "type": "string",
            "description": "Upload one file from your computer (PDF, DOCX, PPTX, HTML). It is converted together with the URLs above."
          },
          "ocr": {
            "title": "OCR for scanned pages",
            "enum": [
              "off",
              "auto",
              "always"
            ],
            "type": "string",
            "description": "Controls OCR for scanned PDF pages; with OCR, scanned pages come back as text. off: never OCR (scanned pages come back empty with a warning, and are not charged). auto: OCR only PDF pages that have images but no text layer. always: OCR every PDF page. OCR pages cost $0.01 each, charged separately from the document price.",
            "default": "off"
          },
          "ocrLanguage": {
            "title": "OCR language",
            "enum": [
              "eng",
              "deu",
              "fra",
              "spa",
              "por",
              "ita",
              "nld",
              "eng+spa",
              "eng+fra",
              "eng+deu"
            ],
            "type": "string",
            "description": "Language of scanned pages.",
            "default": "eng"
          },
          "tables": {
            "title": "Detect tables in PDFs",
            "type": "boolean",
            "description": "Write ruled PDF tables as Markdown tables. DOCX, PPTX and HTML tables are always kept.",
            "default": true
          },
          "pageMarkers": {
            "title": "Page markers",
            "type": "boolean",
            "description": "Insert <!-- page: N --> / <!-- slide: N --> comments so every passage can be traced to its page.",
            "default": true
          },
          "keepImageLinks": {
            "title": "Keep image links",
            "type": "boolean",
            "description": "Keep ![alt](url) image links from HTML/Office files. Off: images become *[Image: alt text]*. Embedded image data is never copied.",
            "default": false
          },
          "markdownInDataset": {
            "title": "Markdown in dataset",
            "type": "boolean",
            "description": "Include the Markdown in each dataset row. The full .md file is always saved to the key-value store as well.",
            "default": true
          },
          "chunkSize": {
            "title": "RAG chunk size (characters)",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Returns RAG chunk rows of about this many characters. Split the Markdown into chunks of about this many characters on heading, paragraph and sentence boundaries. 0 = no chunking. Tables are split by rows with the header repeated.",
            "default": 0
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Characters from the end of each chunk repeated at the start of the next.",
            "default": 200
          },
          "chunkOutput": {
            "title": "Chunk output",
            "enum": [
              "rows",
              "inline"
            ],
            "type": "string",
            "description": "rows: one dataset row per chunk (easy to feed into a vector database) plus the document row. inline: chunks as an array inside the document row.",
            "default": "rows"
          },
          "maxPagesPerDocument": {
            "title": "Max pages per document",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Only the first N pages / slides / estimated pages of each document are converted and charged.",
            "default": 500
          },
          "maxTotalPages": {
            "title": "Max pages per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many pages across all documents. 0 = no limit (the run's spending limit still applies).",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger files are skipped and not charged.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Parallel documents",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Documents converted at the same time (1-4).",
            "default": 2
          },
          "timeoutSec": {
            "title": "Download timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-file download timeout.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}