{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper — Channels, Playlists & AI Chunks",
    "description": "Extract YouTube transcripts and subtitles in bulk from videos, Shorts, whole channels, playlists or search results. Plain text, timestamped segments, SRT/VTT and RAG-ready chunks with deep links. Pay only for transcripts delivered.",
    "version": "0.2",
    "x-build-id": "3tClC5U8EPo9VMZgZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleancut~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleancut-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/cleancut~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cleancut-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/cleancut~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cleancut-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": {
          "startUrls": {
            "title": "YouTube URLs or IDs",
            "type": "array",
            "description": "Videos (watch, youtu.be, Shorts, live, embed, mobile), channels (@handle, /channel/UC…, /c/…, /user/…) and playlists. Plain video IDs and @handles work too.",
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "Search terms",
            "type": "array",
            "description": "One term per line. Each term is searched on YouTube and its top videos are transcribed (how many is set in “Channel, playlist & search options”).",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Newest first for channels. Use a small number to test, a large one to transcribe a whole channel.",
            "default": 20
          },
          "channelTabs": {
            "title": "Channel tabs",
            "type": "array",
            "description": "Which channel sections to read videos from.",
            "items": {
              "type": "string",
              "enum": [
                "videos",
                "shorts",
                "streams"
              ],
              "enumTitles": [
                "Videos",
                "Shorts",
                "Live streams"
              ]
            },
            "default": [
              "videos"
            ]
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference (en, es, pt…). “es” also matches regional variants such as “es-419”.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "preferManual",
              "any",
              "manualOnly",
              "autoOnly"
            ],
            "type": "string",
            "description": "Which captions to use when a video has both human-made and automatic (speech recognition) captions.",
            "default": "preferManual"
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "If none of the preferred languages exists, return the best available transcript instead of an error.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to (optional)",
            "type": "string",
            "description": "Language code to translate the transcript into (es, fr, de…). Leave empty to keep the original language. Tip: run “List caption languages only” first to see which languages each video can be translated to."
          },
          "outputFormats": {
            "title": "Extra formats",
            "type": "array",
            "description": "Pick one or more. AI-ready chunks group the transcript into blocks of N seconds, each with a deep link to that second of the video: ideal for LLMs, embeddings and RAG.",
            "items": {
              "type": "string",
              "enum": [
                "segments",
                "chunks",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Timestamped segments",
                "AI-ready chunks (RAG) with deep links",
                "SRT subtitles",
                "WebVTT subtitles"
              ]
            },
            "default": [
              "segments"
            ]
          },
          "chunkDurationSeconds": {
            "title": "Chunk length (seconds)",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Approximate length of each AI-ready chunk. Only used when “AI-ready chunks” is selected.",
            "default": 60
          },
          "includeVideoDetails": {
            "title": "Include extended video details",
            "type": "boolean",
            "description": "Adds publish date, upload date, category, like count, description, keywords, thumbnail and live flag (about half a second more per video). Title, channel, duration and views are always included.",
            "default": true
          },
          "listLanguagesOnly": {
            "title": "List caption languages only (free)",
            "type": "boolean",
            "description": "Returns one free row per video with its caption tracks (language, human-made or automatic, translatable) and the languages it can be translated to. No transcript is downloaded and nothing is charged.",
            "default": false
          },
          "maxTotalTranscripts": {
            "title": "Max transcripts in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many transcripts (0 = no limit). Useful to cap the cost of a run.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos to process at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Residential proxy is recommended: YouTube blocks most data-center IPs. Transcripts are tiny (~30 KB per video), so residential traffic costs very little.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}