{
  "openapi": "3.0.1",
  "info": {
    "title": "Video OCR - Extract On-Screen Text from Video (Captions)",
    "description": "Video OCR extracts text from video files - burned-in subtitles, captions, ad hook text, titles, lower-thirds, slide text - as timed segments with frame images, a transcript and an SRT/VTT track. Chains with Video Frame Extractor. $2 per 1,000 frames with text; frames without text are free.",
    "version": "1.3",
    "x-build-id": "2efZaNKlJSzxcUaic"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~video-ocr/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-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/kantolabs~video-ocr/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-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/kantolabs~video-ocr/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-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": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Video files (MP4, MOV, WEBM, MKV, AVI, M4V, MPEG-TS...) or public video links, one per line: YouTube videos and Shorts, TikTok videos, Instagram reels/posts, Facebook videos, X posts (read logged out; private, removed or blocked ones are free rows). Also your own storage, S3/R2/GCS, an Apify key-value store, Dropbox or Google Drive share links. Leave the sample in place only if you want it read.",
            "default": [
              "https://api.apify.com/v2/key-value-stores/aXcXwfChlioPWAUJv/records/sample-ocr-captions.mp4?signature=ImU3YcEhw0ddoYvT7QD5"
            ],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Scraper or frame dataset (optional)",
            "type": "string",
            "description": "Pick a dataset: the rows of a TikTok, Instagram, Facebook Ads / Meta Ad Library or YouTube scraper (clockworks, apify, jmlp, automation-lab, streamers) - every video in it is read, in order, with the post's id, link, author and caption in flat upstream* columns - or a Video Frame Extractor run (its frames are read). Image posts, slideshows and rows without a video are free rows. In n8n / Make / an integration pass {{resource.defaultDatasetId}}."
          },
          "maxItems": {
            "title": "Max videos from the dataset",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many videos from a scraper dataset (rows without a video file do not count). Keeps a first try cheap. Not used for Video Frame Extractor datasets.",
            "default": 20
          },
          "sampleIntervalSeconds": {
            "title": "Read a frame every (seconds)",
            "minimum": 0.25,
            "maximum": 60,
            "type": "number",
            "description": "How often a frame is read. 1 s catches every subtitle and caption; 0.5 s suits fast word-by-word TikTok captions; 2-5 s is cheaper for slides, screen recordings and long videos. Frames identical to the previous one are skipped for free.",
            "default": 1
          },
          "ocrLanguage": {
            "title": "Text language (script)",
            "enum": [
              "en",
              "latin",
              "cyrillic",
              "korean",
              "arabic",
              "devanagari",
              "greek",
              "thai"
            ],
            "type": "string",
            "description": "Script of the on-screen text. `en` also reads Chinese and Japanese. Use `latin` for French, German, Spanish, Portuguese, Czech, Polish and other accented Latin languages, `cyrillic` for Russian, Ukrainian, Bulgarian.",
            "default": "en"
          },
          "textRegion": {
            "title": "Text area",
            "enum": [
              "full",
              "bottom",
              "top",
              "custom"
            ],
            "type": "string",
            "description": "Where to look for text. `bottom` = lower 45 % of the frame (subtitles, captions, lower-thirds) and skips signs and logos elsewhere; `top` = upper 45 % (titles, news tickers); `custom` uses \"Custom text area\". A smaller area is also faster.",
            "default": "full"
          },
          "cropBox": {
            "title": "Custom text area",
            "type": "object",
            "description": "Used when \"Text area\" is `custom`. In percent of the frame: {\"x\": 0, \"y\": 70, \"width\": 100, \"height\": 30} reads only the bottom 30 %."
          },
          "minConfidence": {
            "title": "Minimum confidence",
            "minimum": 0.5,
            "maximum": 0.99,
            "type": "number",
            "description": "Text lines read with a lower OCR confidence (0.5-0.99) are dropped. Lower it (0.6) for small or stylised text, raise it (0.85) to drop noise from busy backgrounds.",
            "default": 0.7
          },
          "minTextLength": {
            "title": "Minimum text length (characters)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Ignore text blocks shorter than this (letters and digits only), e.g. stray single letters on a T-shirt.",
            "default": 2
          },
          "frameUrls": {
            "title": "Frame image URLs (optional)",
            "type": "array",
            "description": "Image links (JPG, PNG, WEBP) to read instead of, or as well as, videos - for example the frame links of a Video Frame Extractor run. Their timestamps are taken from Video Frame Extractor file names; other images are read in the given order.",
            "items": {
              "type": "string"
            }
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of frames read per video. When a video would need more (long video, short interval), frames are spread evenly over the whole video instead. Caps the cost per video at this many frames x the frame price.",
            "default": 600
          },
          "maxVideoMinutes": {
            "title": "Max video length (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Longer videos are refused (free).",
            "default": 120
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger files are refused (free).",
            "default": 2000
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Give up on a video that does not download within this time (free).",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}