{
  "openapi": "3.0.1",
  "info": {
    "title": "PDF, Audio & Video to Markdown: OCR + Transcripts",
    "description": "PDFs, scans, audio and video to clean, LLM-ready Markdown: tables preserved, auto OCR, timestamped transcripts with SRT/VTT subtitles (Whisper), video keyframes, RAG chunks. Pay per page or minute.",
    "version": "0.2",
    "x-build-id": "EKFjKCbRQHGu1UDUq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/benexe~pdf-to-markdown-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-benexe-pdf-to-markdown-ocr",
        "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/benexe~pdf-to-markdown-ocr/runs": {
      "post": {
        "operationId": "runs-sync-benexe-pdf-to-markdown-ocr",
        "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/benexe~pdf-to-markdown-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-benexe-pdf-to-markdown-ocr",
        "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": {
          "sources": {
            "title": "Files or YouTube links (URLs)",
            "type": "array",
            "description": "Direct links to PDF, image (PNG, JPEG, TIFF, WebP, GIF, BMP), audio (MP3, WAV, M4A, OGG, FLAC) or video (MP4, MOV, WebM, MKV) files, and YouTube video links (watch, Shorts, live, youtu.be). YouTube audio is downloaded by Apify's YouTube Video Downloader in your account, which bills its own small download fee. Other video platforms are not supported.",
            "items": {
              "type": "string"
            }
          },
          "ocr": {
            "title": "OCR",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "Auto runs OCR only where it is needed, which keeps cost low.",
            "default": "auto"
          },
          "languages": {
            "title": "OCR languages",
            "type": "array",
            "description": "Up to 4 languages present in the documents.",
            "items": {
              "type": "string",
              "enum": [
                "eng",
                "spa",
                "cat",
                "fra",
                "deu",
                "ita",
                "por",
                "nld",
                "pol"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "Catalan",
                "French",
                "German",
                "Italian",
                "Portuguese",
                "Dutch",
                "Polish"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "pages": {
            "title": "Page range (optional)",
            "type": "string",
            "description": "For example 1-5,8,10- . Empty = all pages."
          },
          "maxPagesPerDocument": {
            "title": "Max pages per document",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Pages beyond this limit are skipped (the record is marked partial).",
            "default": 300
          },
          "includeChunks": {
            "title": "RAG chunks",
            "type": "boolean",
            "description": "Also return the Markdown split into chunks on paragraph/table boundaries, with page numbers.",
            "default": false
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum characters per chunk.",
            "default": 1500
          },
          "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": 150
          },
          "includePages": {
            "title": "Per-page text",
            "type": "boolean",
            "description": "Also return the raw text of each page with the method used (text layer or OCR) and OCR confidence.",
            "default": false
          },
          "pageMarkers": {
            "title": "Page markers in Markdown",
            "type": "boolean",
            "description": "Insert invisible <!-- page N --> markers, useful for citations.",
            "default": true
          },
          "ocrDpi": {
            "title": "OCR resolution (DPI)",
            "minimum": 150,
            "maximum": 400,
            "type": "integer",
            "description": "Rendering resolution for OCR. 300 is a good balance of accuracy and speed.",
            "default": 300
          },
          "maxFileMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Files larger than this are skipped (free).",
            "default": 200
          },
          "transcribe": {
            "title": "Transcribe audio & video",
            "type": "boolean",
            "description": "Transcribe audio and video files (MP3, WAV, M4A, OGG, FLAC, MP4, MOV, WebM…) with Whisper large-v3 turbo.",
            "default": true
          },
          "transcriptionLanguage": {
            "title": "Spoken language (optional)",
            "enum": [
              "en",
              "es",
              "ca",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "pl",
              "ru",
              "uk",
              "ar",
              "zh",
              "ja",
              "ko",
              "hi",
              "tr",
              "sv",
              "da",
              "no",
              "fi",
              "cs",
              "ro",
              "hu",
              "el",
              "he",
              "id",
              "vi",
              "th"
            ],
            "type": "string",
            "description": "Leave empty to detect it automatically. Setting it improves accuracy for short clips."
          },
          "includeSegments": {
            "title": "Timestamped segments",
            "type": "boolean",
            "description": "Return the transcript as segments with start and end times.",
            "default": true
          },
          "includeSubtitles": {
            "title": "Subtitles (SRT + VTT)",
            "type": "boolean",
            "description": "Also return ready-to-use SRT and WebVTT subtitles.",
            "default": false
          },
          "keyframes": {
            "title": "Video keyframes",
            "enum": [
              "off",
              "scene",
              "interval"
            ],
            "type": "string",
            "description": "Extract still frames for vision models. Frames are saved as JPEG in the run's key-value store with public links.",
            "default": "off"
          },
          "keyframeIntervalSec": {
            "title": "Keyframe interval (seconds)",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Used when keyframes = every N seconds.",
            "default": 10
          },
          "maxKeyframes": {
            "title": "Max keyframes per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap per video.",
            "default": 30
          },
          "maxMediaMinutes": {
            "title": "Max minutes transcribed per file",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Longer recordings are transcribed up to this length (record marked partial).",
            "default": 120
          },
          "groqApiKey": {
            "title": "Your Groq API key (optional, cheaper)",
            "type": "string",
            "description": "Bring your own key from console.groq.com to pay the lower per-minute price and use your own quota. Stored encrypted; never logged."
          },
          "healthCheck": {
            "title": "Health check mode",
            "type": "boolean",
            "description": "Internal. Never charged.",
            "default": false
          },
          "healthProfile": {
            "title": "Health check profile",
            "type": "string",
            "description": "Internal. Used only together with health check mode."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}