{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript & Subtitles API: Bulk, Channels, Playlists",
    "description": "Get YouTube transcripts and subtitles (SRT/VTT) in bulk, from videos, channels or playlists. $5 per 1,000 on paid plans, and you only pay for successful transcripts.",
    "version": "1.0",
    "x-build-id": "LxoRVSKhQZV5p4SBH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nawfel_bc~youtube-transcript-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nawfel_bc-youtube-transcript-api",
        "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/nawfel_bc~youtube-transcript-api/runs": {
      "post": {
        "operationId": "runs-sync-nawfel_bc-youtube-transcript-api",
        "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/nawfel_bc~youtube-transcript-api/run-sync": {
      "post": {
        "operationId": "run-sync-nawfel_bc-youtube-transcript-api",
        "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": {
          "videoUrl": {
            "title": "Video URL",
            "type": "string",
            "description": "One YouTube video: a watch URL, youtu.be link, Shorts link, embed link, or the bare 11-character video ID. Same field as the common single-video transcript format."
          },
          "targetLanguage": {
            "title": "Target Language",
            "enum": [
              "en",
              "pt",
              "es",
              "fr",
              "de",
              "it",
              "ja",
              "ko",
              "zh",
              "ru",
              "ar",
              "hi",
              "nl",
              "pl",
              "tr",
              "vi",
              "id",
              "th",
              "sv",
              "da",
              "no",
              "fi",
              "cs",
              "hu",
              "ro",
              "uk",
              "el",
              "he",
              "fa",
              "bn",
              "ta",
              "te",
              "mr",
              "ur",
              "gu",
              "kn",
              "ml",
              "pa",
              "sr",
              "hr",
              "bg",
              "sk",
              "lt",
              "lv",
              "et",
              "sl",
              "ca",
              "af",
              "sq",
              "am",
              "hy",
              "az",
              "eu",
              "be",
              "bs",
              "my",
              "ceb",
              "zh-Hans",
              "zh-Hant",
              "co",
              "eo",
              "fil",
              "fy",
              "gl",
              "ka",
              "ht",
              "ha",
              "haw",
              "hmn",
              "is",
              "ig",
              "ga",
              "jv",
              "kk",
              "km",
              "rw",
              "ku",
              "ky",
              "lo",
              "la",
              "lb",
              "mk",
              "mg",
              "ms",
              "mt",
              "mi",
              "mn",
              "ne",
              "ny",
              "or",
              "ps",
              "sm",
              "gd",
              "sn",
              "sd",
              "si",
              "so",
              "st",
              "su",
              "sw",
              "tg",
              "tt",
              "tk",
              "ug",
              "uz",
              "cy",
              "xh",
              "yi",
              "yo",
              "zu"
            ],
            "type": "string",
            "description": "Language of the transcript, as an ISO 639-1 code (e.g. en, es, pt, fr, de, ja). Default: en. If the video has no captions in this language, see fallbackToAnyLanguage. Transcripts are never machine-translated.",
            "default": "en"
          },
          "videoUrls": {
            "title": "Video URLs (bulk)",
            "type": "array",
            "description": "Many videos in one run: a list of YouTube video URLs or 11-character video IDs. Duplicates are removed. You can combine this with videoUrl, channelUrl and playlistUrl.",
            "items": {
              "type": "string"
            }
          },
          "channelUrl": {
            "title": "Channel URL",
            "type": "string",
            "description": "Get transcripts for a channel's latest videos (newest first, up to maxVideos). Accepts https://www.youtube.com/@handle, @handle, /channel/UC… URLs or IDs, and /c/… or /user/… URLs."
          },
          "playlistUrl": {
            "title": "Playlist URL",
            "type": "string",
            "description": "Get transcripts for the videos of a playlist (up to maxVideos). Accepts a playlist URL (any URL with list=…) or a playlist ID."
          },
          "maxVideos": {
            "title": "Max videos per channel/playlist",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of videos taken from channelUrl and from playlistUrl. Does not limit videoUrl/videoUrls.",
            "default": 50
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "both",
              "segments",
              "text",
              "none"
            ],
            "type": "string",
            "description": "segments = timestamped segments in `data` ([{start, dur, text}]); text = the whole transcript as one string in `text`; both = both fields; none = neither (useful with searchKeywords or chunks to keep results small).",
            "default": "both"
          },
          "searchKeywords": {
            "title": "Find the moment: keywords",
            "type": "array",
            "description": "Words or phrases to find in each transcript (e.g. pricing, Bitcoin, a competitor's name). Each match is returned in `matches` with its time, a link that opens the video at that moment (&t=123s), the chapter, and the surrounding sentence. Case- and accent-insensitive; phrases can span caption lines. Charged per transcript searched.",
            "items": {
              "type": "string"
            }
          },
          "chunkSize": {
            "title": "AI chunks: size in characters",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Also split each transcript into chunks of up to this many characters (e.g. 1000-2000 for RAG / embeddings). Each chunk has start/end times, its chapter, and a link that opens the video at that moment (&t=123s). Chunks never split a caption line or cross a chapter. 0 = no chunks. No extra cost.",
            "default": 0
          },
          "extraFormats": {
            "title": "Extra formats",
            "type": "array",
            "description": "Also return the transcript as: srt / vtt (standard subtitle files), markdown (title, chapter headings, and paragraphs with clickable timestamps), paragraphs (readable paragraphs split at pauses, each with a timestamp link). No extra cost.",
            "items": {
              "type": "string",
              "enum": [
                "srt",
                "vtt",
                "markdown",
                "paragraphs"
              ],
              "enumTitles": [
                "SRT subtitles",
                "WebVTT subtitles",
                "Markdown document",
                "Paragraphs"
              ]
            },
            "default": []
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to another language",
            "type": "boolean",
            "description": "If the video has no captions in targetLanguage, return the transcript in the video's own language instead (flagged with isLanguageFallback: true; charged as a transcript). If off, such videos return LANGUAGE_NOT_AVAILABLE with the list of availableLanguages, and are not charged.",
            "default": true
          },
          "onlyNewVideos": {
            "title": "Only new videos (monitoring)",
            "type": "boolean",
            "description": "For scheduled runs: skip videos this input already delivered in earlier runs, so each run returns only new videos' transcripts. Videos without captions yet (common for fresh uploads) are retried on later runs for up to 7 days and are not charged until they succeed. State is kept in a key-value store named youtube-transcript-monitor in your account.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitoring state name",
            "type": "string",
            "description": "Optional. Name for this monitor's memory, if you run several schedules on the same channel and want them tracked separately. By default it is derived from the channel/playlist/videos and language."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}