{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Extractor",
    "description": "Extract public YouTube transcripts from videos, Shorts, playlists and channels.",
    "version": "1.0",
    "x-build-id": "gPwVIg89F9zX2QyxD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aitorsm~youtube-transcript-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aitorsm-youtube-transcript-extractor",
        "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/aitorsm~youtube-transcript-extractor/runs": {
      "post": {
        "operationId": "runs-sync-aitorsm-youtube-transcript-extractor",
        "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/aitorsm~youtube-transcript-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-aitorsm-youtube-transcript-extractor",
        "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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "YouTube URLs",
            "minItems": 1,
            "maxItems": 5000,
            "uniqueItems": false,
            "type": "array",
            "description": "Any mix of video, Shorts, playlist and channel URLs, or bare video IDs. Channels work with @handle, /channel/UC..., /c/... and /user/... links. Add /videos, /shorts or /streams to a channel URL to take only that tab.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          },
          "preferredLanguages": {
            "title": "Transcript language (in order of preference)",
            "type": "array",
            "description": "Which language you want the transcript in, in order of preference. Original language of the video is the language it was recorded in (YouTube tells us which one), so you get the real transcript even when YouTube offers auto-dubbed translations. To prefer a translation when it exists, put a language before it: English, then Original = English if available, otherwise the original. If you leave Original out and the video has none of your languages, the row says language_not_available and lists the languages it does have. A language also matches its regional variants (Spanish covers es-ES, es-MX, es-419).",
            "items": {
              "type": "string",
              "enum": [
                "original",
                "en",
                "es",
                "pt",
                "fr",
                "de",
                "it",
                "nl",
                "ca",
                "eu",
                "gl",
                "pl",
                "cs",
                "sk",
                "hu",
                "ro",
                "bg",
                "hr",
                "sr",
                "sl",
                "el",
                "uk",
                "ru",
                "sv",
                "da",
                "nb",
                "fi",
                "et",
                "lv",
                "lt",
                "tr",
                "ar",
                "he",
                "fa",
                "hi",
                "bn",
                "ur",
                "ta",
                "te",
                "mr",
                "gu",
                "kn",
                "ml",
                "pa",
                "ne",
                "si",
                "id",
                "ms",
                "vi",
                "th",
                "fil",
                "km",
                "ja",
                "ko",
                "zh-Hans",
                "zh-Hant",
                "yue",
                "sw",
                "am",
                "af",
                "az",
                "kk",
                "uz",
                "ka",
                "hy",
                "mn",
                "la"
              ],
              "enumTitles": [
                "Original language of the video",
                "English",
                "Spanish",
                "Portuguese",
                "French",
                "German",
                "Italian",
                "Dutch",
                "Catalan",
                "Basque",
                "Galician",
                "Polish",
                "Czech",
                "Slovak",
                "Hungarian",
                "Romanian",
                "Bulgarian",
                "Croatian",
                "Serbian",
                "Slovenian",
                "Greek",
                "Ukrainian",
                "Russian",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Estonian",
                "Latvian",
                "Lithuanian",
                "Turkish",
                "Arabic",
                "Hebrew",
                "Persian",
                "Hindi",
                "Bengali",
                "Urdu",
                "Tamil",
                "Telugu",
                "Marathi",
                "Gujarati",
                "Kannada",
                "Malayalam",
                "Punjabi",
                "Nepali",
                "Sinhala",
                "Indonesian",
                "Malay",
                "Vietnamese",
                "Thai",
                "Filipino",
                "Khmer",
                "Japanese",
                "Korean",
                "Chinese (Simplified)",
                "Chinese (Traditional)",
                "Cantonese",
                "Swahili",
                "Amharic",
                "Afrikaans",
                "Azerbaijani",
                "Kazakh",
                "Uzbek",
                "Georgian",
                "Armenian",
                "Mongolian",
                "Latin"
              ]
            },
            "default": [
              "original"
            ]
          },
          "captionPreference": {
            "title": "Which captions to prefer",
            "enum": [
              "manual_first",
              "auto_first"
            ],
            "type": "string",
            "description": "Videos can have captions uploaded by the creator (usually accurate, with punctuation) and captions generated automatically by YouTube. Choose which one wins when both exist in your language; the other is used as fallback.",
            "default": "manual_first"
          },
          "outputFormats": {
            "title": "What to include in each row",
            "type": "array",
            "description": "Plain text is the transcript as one block, best for reading and for LLMs. Timestamped segments tell you when each line is spoken (milliseconds), for search, clipping and linking to a moment. SRT and WebVTT are subtitle files for video editors and web players. Pick as many as you need.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "Timestamped segments (ms)",
                "SRT subtitles",
                "WebVTT subtitles"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "maxTotalVideos": {
            "title": "Max videos per run",
            "minimum": 1,
            "type": "integer",
            "description": "Safety limit for big channels and playlists: the total number of videos this run will take across all the URLs you pasted. Channels and playlists are read newest first until the limit is reached. Videos already delivered in a previous run under the same job name (see below) count toward it but are free. Raise it as high as you need; to cap spending, use Max total charge in Run options.",
            "default": 10000
          },
          "publishedAfter": {
            "title": "Published after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Leave empty to take all videos. Otherwise, only videos published on or after this date (YYYY-MM-DD), using the exact publish date from YouTube."
          },
          "publishedBefore": {
            "title": "Published before",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Leave empty to take all videos. Otherwise, only videos published on or before this date (YYYY-MM-DD)."
          },
          "jobName": {
            "title": "Remember delivered videos under this name",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,39}$",
            "maxLength": 40,
            "type": "string",
            "description": "Type a short name for this job, e.g. itnig (letters, digits, dashes, up to 40). The Actor keeps a list, in your own Apify account, of the videos it already delivered under that name. Next time you run with the same name it skips them (free rows marked unchanged) and delivers only the new ones. Use a different name to start from scratch."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}