{
  "openapi": "3.0.1",
  "info": {
    "title": "Video OCR – On-Screen Text, Slides & Burned-In Subtitles",
    "description": "Extract on-screen text from video files as a timed track: slides, burned-in (hardcoded) subtitles, captions and ad hook text. Merged segments with start/end times, full transcript, SRT and VTT files. Tesseract OCR, 15+ languages. $2 per 1,000 frames with text.",
    "version": "0.1",
    "x-build-id": "QVyXU638HRi5mH2qU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~video-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-video-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/gazidev~video-ocr/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-video-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/gazidev~video-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-video-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": {
          "videos": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct links to video FILES (MP4, MOV, WebM, MKV, M4V, AVI, TS...). YouTube/TikTok/Instagram pages and HLS playlists are refused: this Actor reads files you may process, it is not a downloader. Private-network addresses are refused too. The pre-filled demo is the Sintel trailer (Blender Foundation, CC BY 3.0, 52 s).",
            "default": [
              "https://upload.wikimedia.org/wikipedia/commons/transcoded/0/06/Sintel_trailer-1080p.ogv/Sintel_trailer-1080p.ogv.480p.vp9.webm"
            ],
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (URLs or CSV)",
            "type": "string",
            "description": "One URL per line, or a CSV with a `url` column."
          },
          "datasetId": {
            "title": "Read video URLs from an Apify dataset",
            "type": "string",
            "description": "Every item's URL field (below) is processed."
          },
          "datasetField": {
            "title": "Dataset field with the video URL",
            "type": "string",
            "description": "Field name in that dataset.",
            "default": "url"
          },
          "uploadedFiles": {
            "title": "Upload videos from your computer",
            "type": "array",
            "description": "This Actor runs with limited permissions, so ALSO select the store you uploaded into in 'Key-value store with your uploads'. When you upload files, the pre-filled demo video is ignored."
          },
          "uploadStore": {
            "title": "Key-value store with your uploads",
            "type": "string",
            "description": "Grants this run read access to that store only. If `uploadedFiles` points into it, only those files are processed; otherwise every media file in the store is (up to 1,000)."
          },
          "region": {
            "title": "Where is the text?",
            "enum": [
              "full",
              "bottom-third",
              "bottom-half",
              "top-third",
              "top-half",
              "middle-third",
              "custom"
            ],
            "type": "string",
            "description": "OCR only this part of the frame. For burned-in subtitles pick 'Bottom third': faster, and logos or scenery text elsewhere stay out of your SRT.",
            "default": "full"
          },
          "customRegion": {
            "title": "Custom rectangle (x, y, width, height in %)",
            "type": "string",
            "description": "Used when 'Where is the text?' is Custom. Percent of the frame from the top-left corner, e.g. `0,75,100,25` = the bottom quarter."
          },
          "languages": {
            "title": "Text languages",
            "type": "array",
            "description": "Tesseract language codes or names, up to 4 (e.g. `eng`, `deu`, `spa`, `tur`, `chi_sim`, or `en`, `german`). Preinstalled: eng deu fra spa ita por nld tur pol rus ara hin chi_sim jpn kor; any other of the ~100 Tesseract languages is downloaded at run start. Each extra language slows OCR down.",
            "default": [
              "eng"
            ],
            "items": {
              "type": "string"
            }
          },
          "textColor": {
            "title": "Text style",
            "enum": [
              "auto",
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Auto tries an isolation pass for white/yellow outlined text on busy footage and falls back to the plain frame. Forcing one style is faster (one OCR pass per frame).",
            "default": "auto"
          },
          "textLayout": {
            "title": "Text layout",
            "enum": [
              "auto",
              "sparse",
              "block"
            ],
            "type": "string",
            "description": "Tesseract page segmentation. 'Sparse' finds isolated words (UI labels, ad stickers) but reads more noise.",
            "default": "auto"
          },
          "minConfidence": {
            "title": "Minimum word confidence (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Words Tesseract is less sure about are dropped. Lines made mostly of symbols (texture noise) are always dropped.",
            "default": 60
          },
          "frameIntervalSec": {
            "title": "Sample a frame every N seconds",
            "minimum": 0.2,
            "maximum": 60,
            "type": "number",
            "description": "Time resolution of the text track. 1 s suits subtitles; 2-5 s is enough (and cheaper) for slides and webinars; 0.5 s for fast ad captions.",
            "default": 1
          },
          "sceneDetection": {
            "title": "Also sample at scene cuts",
            "type": "boolean",
            "description": "Adds a frame at every hard cut (at least 0.3 s after the previous one), so text that appears with a new shot gets an exact start time.",
            "default": true
          },
          "sceneThreshold": {
            "title": "Scene cut sensitivity",
            "minimum": 0.05,
            "maximum": 0.9,
            "type": "number",
            "description": "ffmpeg scene score (0-1). Lower = more cuts detected.",
            "default": 0.3
          },
          "skipDuplicateFrames": {
            "title": "Skip near-duplicate frames",
            "type": "boolean",
            "description": "A frame that looks the same as the last OCR'd frame (static slide, paused screen) reuses its text: no OCR and no charge.",
            "default": true
          },
          "upscaleSmallFrames": {
            "title": "Enlarge low-resolution frames",
            "type": "boolean",
            "description": "Frames under 600 px high are enlarged 1.5-2x before OCR (small subtitles are read much better). Turn off for speed.",
            "default": true
          },
          "maxFrameWidth": {
            "title": "Max frame width for OCR (px)",
            "minimum": 320,
            "maximum": 3840,
            "type": "integer",
            "description": "Larger frames are scaled down (4K video OCR'd at 1280 px is ~4x faster and reads normal-size text just as well). Raise it for tiny text in 4K screen recordings.",
            "default": 1280
          },
          "outputMode": {
            "title": "Dataset rows",
            "enum": [
              "videos",
              "segments"
            ],
            "type": "string",
            "description": "SRT, VTT and a full JSON (segments, cues, per-frame OCR) are saved to the key-value store either way.",
            "default": "videos"
          },
          "saveTextFrames": {
            "title": "Save frames that contain text (JPEG)",
            "type": "boolean",
            "description": "Stores each OCR'd frame with text (greyscale, the OCR'd region only, up to 500 per video) and links it in `textFrames`.",
            "default": false
          },
          "maxMinutesPerVideo": {
            "title": "Max minutes per video",
            "minimum": 0.1,
            "maximum": 600,
            "type": "number",
            "description": "Only the first N minutes are read (and billed).",
            "default": 60
          },
          "maxFramesPerVideo": {
            "title": "Max sampled frames per video",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Safety cap on sampled frames (including skipped ones).",
            "default": 3600
          },
          "maxFileSizeMb": {
            "title": "Max input file size (MB)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Larger files are skipped (free). Above ~2,000 MB give the run more memory (disk).",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}