{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript API — Videos, Channels, Playlists, SRT/VTT",
    "description": "Bulk YouTube transcripts and subtitles from video, Shorts, channel and playlist URLs, or another Actor's dataset. One item per video: timestamped segments, text, SRT, VTT, language choice. $1 per 1,000 videos on the free plan, from $1 on paid plans; no captions = free. For n8n, Make, MCP agents.",
    "version": "0.1",
    "x-build-id": "srPrEZMTct16EUtNT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sherwood~youtube-transcript-batch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sherwood-youtube-transcript-batch",
        "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/sherwood~youtube-transcript-batch/runs": {
      "post": {
        "operationId": "runs-sync-sherwood-youtube-transcript-batch",
        "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/sherwood~youtube-transcript-batch/run-sync": {
      "post": {
        "operationId": "run-sync-sherwood-youtube-transcript-batch",
        "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": "Videos, channels or playlists",
            "type": "array",
            "description": "One entry per line: video URLs (watch, youtu.be, Shorts, live, embed), bare 11-character video IDs, channel URLs or @handles (their Videos tab, newest first) and playlist URLs. Aliases accepted: videoUrl, urls, startUrls, youtube_url, youtubeUrls, videoIds, videoId, channel, channels, playlist (a string with commas or new lines is split). Nothing is required: the examples below run alone.",
            "default": [
              "https://www.youtube.com/watch?v=jNQXAC9IVRw",
              "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
            ],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "ISO 639-1 codes in order of preference (\"en\", \"fr\", \"pt-BR\"). The first available track wins, a manual track before an auto-generated one. Empty: the video's own language (first manual track, else first auto-generated track).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "transcriptType": {
            "title": "Transcript type",
            "enum": [
              "any",
              "manual",
              "generated"
            ],
            "type": "string",
            "description": "Which caption tracks to consider.",
            "default": "any"
          },
          "translateTo": {
            "title": "Translate to",
            "type": "string",
            "description": "Optional ISO 639-1 code (\"es\", \"fr\", \"de\") for YouTube's machine translation of the chosen track. Best effort: YouTube rate-limits translations and refused every one in our tests (HTTP 429); the original track is then returned, translated_to stays null and translation_error says why. Never charged twice."
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "What each item carries. Default: timestamped segments and plain text.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "text",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Timestamped segments (timestamped)",
                "Plain text (non_timestamped)",
                "SRT subtitles (srt)",
                "WebVTT subtitles (vtt)"
              ]
            },
            "default": [
              "json",
              "text"
            ]
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Title, channel, duration, view count and thumbnail, from the same YouTube response as the captions (free, no extra time).",
            "default": true
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel or playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many videos to list from each channel (newest first) or playlist. Default 100.",
            "default": 100
          },
          "maxVideos": {
            "title": "Max videos per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many unique videos over all sources. Default 1,000.",
            "default": 1000
          },
          "datasetId": {
            "title": "Dataset of another Actor",
            "type": "string",
            "description": "Transcribe the videos listed in an existing dataset (a YouTube channel or search scraper, for example). The video URL or ID is read from urlField, or found among url, videoUrl, video_url, youtube_url, videoId, video_id, link, id."
          },
          "urlField": {
            "title": "Field holding the video URL in the dataset",
            "type": "string",
            "description": "Dotted path inside each dataset item (\"video.url\"). Leave empty to let the Actor find it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}