{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Video Transcript Scraper: Captions, Subtitles, SRT",
    "description": "YouTube transcript extractor for any video, channel, playlist or search: the video transcript text and timed segments, each track labelled manual or auto-generated captions. YouTube subtitles as SRT, WebVTT, Markdown or chunks, with metadata, chapters, comments, translation. No login.",
    "version": "0.1",
    "x-build-id": "vqzU7ReZA2vj9qo1Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hyperbach~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hyperbach-youtube-transcript-scraper",
        "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/hyperbach~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hyperbach-youtube-transcript-scraper",
        "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/hyperbach~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hyperbach-youtube-transcript-scraper",
        "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": "Videos",
            "type": "array",
            "description": "YouTube videos in any form: watch, youtu.be, Shorts, live, embed and music.youtube.com links, or bare 11-character ids. One run takes many; repeats of the same video are read once. A channel or playlist link pasted here is read as one. A link to a text file, a CSV or a published Google Sheet with one URL or id per line is read as a list.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channels": {
            "title": "Channels",
            "type": "array",
            "description": "Channels to read the latest videos of: `@handle`, a channel link, or a `UC…` channel id. Newest first, up to `maxVideosPerSource` each.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "playlists": {
            "title": "Playlists",
            "type": "array",
            "description": "Playlists: a playlist link or its id (`PL…`). In playlist order, up to `maxVideosPerSource` each.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "YouTube searches: the videos the search returns, in YouTube's order, up to `maxVideosPerSource` each.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many videos to take from each channel, playlist and search (videos without captions count; videos outside your dates or durations do not). Videos you list one by one are all read.",
            "default": 50
          },
          "channelContent": {
            "title": "Channel content",
            "enum": [
              "all",
              "videos",
              "shorts",
              "live"
            ],
            "type": "string",
            "description": "Which of a channel's uploads to read.",
            "default": "all"
          },
          "dateFrom": {
            "title": "Published from",
            "pattern": "^(|[0-9]{4}-[0-9]{2}-[0-9]{2}|[0-9]{1,4} *(day|week|month|year)s?)$",
            "type": "string",
            "description": "Only videos published on or after this date: `2026-09-01`, or a span back from today such as `30 days`, `2 weeks`, `6 months`. Applies to channels, playlists and searches; a channel's walk stops at the first video older than this.",
            "default": ""
          },
          "dateTo": {
            "title": "Published until",
            "pattern": "^(|[0-9]{4}-[0-9]{2}-[0-9]{2}|[0-9]{1,4} *(day|week|month|year)s?)$",
            "type": "string",
            "description": "Only videos published on or before this date (same forms as `dateFrom`). Applies to channels, playlists and searches.",
            "default": ""
          },
          "minDurationSeconds": {
            "title": "Min duration (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Skip shorter videos from channels, playlists and searches. 0 = no limit.",
            "default": 0
          },
          "maxDurationSeconds": {
            "title": "Max duration (seconds)",
            "minimum": 0,
            "maximum": 86400,
            "type": "integer",
            "description": "Skip longer videos from channels, playlists and searches. 0 = no limit.",
            "default": 0
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Transcript languages to look for, in order of preference: `en`, `de`, `pt-BR`, `es-419`. A code without a region also matches the regional track (`de` finds `de-DE`). When the video has none of them, the row carries the video's spoken language and `language_note` says so. Empty = the video's spoken language.",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$"
            },
            "default": []
          },
          "trackKind": {
            "title": "Manual or auto-generated",
            "enum": [
              "manual_first",
              "auto_first",
              "manual_only",
              "auto_only"
            ],
            "type": "string",
            "description": "YouTube has captions written by people (manual) and its own speech recognition (auto-generated); every row says which it is (`track_kind`). The two \"only\" choices return a free labelled row when the video lacks that kind.",
            "default": "manual_first"
          },
          "allTracks": {
            "title": "Every track of the video",
            "type": "boolean",
            "description": "Also put every other caption track of the video on the row (`other_tracks`: each language, manual and auto-generated, with its text and segments). With `trackKind` manual only or auto-generated only, the other tracks are of that kind only. Charged per extra track.",
            "default": false
          },
          "outputFormats": {
            "title": "Extra formats",
            "type": "array",
            "description": "Formats added to each row next to the plain text and the timed segments, which every row has.",
            "items": {
              "type": "string",
              "enum": [
                "srt",
                "vtt",
                "paragraphs",
                "chunks",
                "markdown"
              ],
              "enumTitles": [
                "SRT subtitles",
                "WebVTT subtitles",
                "Paragraphs with start and end",
                "RAG chunks (with chapter titles)",
                "Markdown with timestamp links"
              ]
            },
            "default": []
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 100,
            "maximum": 20000,
            "type": "integer",
            "description": "About how long each RAG chunk is. Chunks end at caption boundaries and at chapter starts, never inside a caption.",
            "default": 1000
          },
          "includeSegments": {
            "title": "Timed segments",
            "type": "boolean",
            "description": "Keep the timed segments (`segments`: start, duration, text) on each row. Off = text and formats only, for smaller rows.",
            "default": true
          },
          "saveFiles": {
            "title": "Save files",
            "type": "boolean",
            "description": "Also write the text and each extra format as files in the run's key-value store (`<videoId>.txt`, `.srt`, `.vtt`, `.md`, …), with their links on the row (`files`). Free.",
            "default": false
          },
          "translateTo": {
            "title": "Translate to (machine translation)",
            "pattern": "^(|[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*)$",
            "type": "string",
            "description": "A language code (`fr`, `de`, `ja`, `pt-BR`, `zh-Hans`): each transcript is also translated by an OpenAI model and delivered next to the original (`translation`), segment for segment with the same timing, labelled `machine (OpenAI gpt-6-luna)`. It is not YouTube's own translation, which YouTube does not serve logged out. Charged per started 1,000 characters of the original, only when every segment came back; a translation with a missing segment says which and costs nothing.",
            "default": ""
          },
          "transcribeMissing": {
            "title": "Speech-to-text when there are no captions",
            "type": "boolean",
            "description": "For a video without any caption track, transcribe its audio with OpenAI whisper-1 (timed segments), labelled `speech-to-text (OpenAI whisper-1)`. Up to about 105 minutes of audio per video. Charged per started minute.",
            "default": false
          },
          "maxComments": {
            "title": "Comments per video",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Top-level comments to add to each row (`comments`: text, author, likes, replies, when). 0 = none. Charged per comment.",
            "default": 0
          },
          "maxItems": {
            "title": "Max transcripts",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "The most transcripts this run delivers (and charges). 0 = no limit. Free rows (no captions, unavailable) do not count.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos this task delivered a transcript for in an earlier run: run a channel daily and get only its new videos. A video without captions is read again on each run (a free row): its captions can come later. Turns the memory on.",
            "default": false
          },
          "stateStoreName": {
            "title": "Memory name",
            "pattern": "^([A-Za-z0-9._-]{1,100})?$",
            "type": "string",
            "description": "Name of the memory between runs. Empty = derived from your videos, channels, playlists and searches, so the same task always meets its own memory.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}