{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Subtitles to Text, SRT & API",
    "description": "Get YouTube transcripts and subtitles of videos, Shorts, whole channels and playlists: plain text, timestamped segments, SRT or VTT, any caption language, manual or auto-generated. Search words inside transcripts with links to the moment. Only-new mode for new uploads. No API key.",
    "version": "0.1",
    "x-build-id": "tWivwcNMWpBbiNky7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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",
        "required": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "🎬 Videos, Shorts, channels or playlists",
            "type": "array",
            "description": "One per line: video links (youtube.com/watch?v=..., youtu.be/...), Shorts links (/shorts/...), 11-character video IDs, channel links (youtube.com/@handle, /channel/UC...), @handles or playlist links (?list=...). A channel gives its latest videos, a playlist its videos (see Videos per channel or playlist).",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerChannel": {
            "title": "📺 Videos per channel or playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "For channels: how many of the latest uploads (videos, Shorts, past streams). For playlists: how many videos from the top.",
            "default": 10
          },
          "languages": {
            "title": "🌍 Transcript languages",
            "type": "array",
            "description": "Preferred caption languages in order, as codes: en, es, de, fr, pt, hi, ja... The first one the video has is used ('en' also matches en-GB). Default: en.",
            "items": {
              "type": "string"
            }
          },
          "anyLanguage": {
            "title": "🔄 Otherwise use the original language",
            "type": "boolean",
            "description": "If a video has none of your languages, return the transcript in its spoken language (the auto-generated track) instead of skipping it. Machine translation is not available.",
            "default": true
          },
          "autoGenerated": {
            "title": "🤖 Auto-generated captions",
            "enum": [
              "fallback",
              "prefer",
              "never"
            ],
            "type": "string",
            "description": "Most videos have only YouTube's auto-generated captions. Manual captions are written by the creator: cleaner, with punctuation.",
            "default": "fallback"
          },
          "includeSegments": {
            "title": "⏱️ Timestamped segments",
            "type": "boolean",
            "description": "segments: a list of {start, duration, text} in seconds, one per caption line.",
            "default": true
          },
          "includeTimestampedText": {
            "title": "🕒 Text with timestamps",
            "type": "boolean",
            "description": "timestampedText: one line per caption with its time, like [1:23] text. Handy for notes and LLM prompts that cite the moment.",
            "default": false
          },
          "includeSrt": {
            "title": "🎞️ SRT subtitles",
            "type": "boolean",
            "description": "srt: the transcript as an .srt subtitle file (text).",
            "default": false
          },
          "includeVtt": {
            "title": "🎞️ VTT subtitles",
            "type": "boolean",
            "description": "vtt: the transcript as a WebVTT subtitle file (text).",
            "default": false
          },
          "includeDescription": {
            "title": "📝 Video description and tags",
            "type": "boolean",
            "description": "Also return the video description and its tags (keywords).",
            "default": false
          },
          "searchWords": {
            "title": "🔍 Search words in transcripts",
            "type": "array",
            "description": "Find where these words or phrases are said, not case-sensitive. Each video gets matches: the word, the time, the caption line and a link that opens the video at that moment.",
            "items": {
              "type": "string"
            }
          },
          "onlyVideosWithMatches": {
            "title": "🎯 Only videos that mention the words",
            "type": "boolean",
            "description": "With Search words: skip videos where none of the words is said. Skipped videos are free.",
            "default": false
          },
          "onlyNew": {
            "title": "🔔 Only new videos",
            "type": "boolean",
            "description": "For scheduled runs with channels or playlists. The first run returns the transcripts of the latest videos and remembers them; every later run returns only videos it has not seen before. An empty result means no new videos.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Name of the memory used by Only new videos. Use a different name for each task.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "⚡ Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos are processed at the same time.",
            "default": 5
          },
          "residentialFallback": {
            "title": "🏠 Residential proxy fallback",
            "type": "boolean",
            "description": "YouTube blocks transcripts for many datacenter IPs. After 8 blocked datacenter IPs the Actor tries residential IPs (included in the price). Turn off only if your plan has no residential proxies.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Transcripts need Apify Proxy: the Actor takes a fresh datacenter IP for each attempt. Keep the default.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}