{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Bulk, SRT, Channels, Playlists",
    "description": "YouTube transcript scraper for videos, Shorts, playlists, channels and search. Text, timestamps, SRT/VTT, RAG chunks; manual vs auto captions, language fallback, publish date. Free rows with a clear reason for videos without captions. No API key.",
    "version": "1.0",
    "x-build-id": "hahm67TpuyFLPQ0Zq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mosaicked_sponge~youtube-transcript-scraper-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mosaicked_sponge-youtube-transcript-scraper-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/mosaicked_sponge~youtube-transcript-scraper-api/runs": {
      "post": {
        "operationId": "runs-sync-mosaicked_sponge-youtube-transcript-scraper-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/mosaicked_sponge~youtube-transcript-scraper-api/run-sync": {
      "post": {
        "operationId": "run-sync-mosaicked_sponge-youtube-transcript-scraper-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": {
          "startUrls": {
            "title": "YouTube links",
            "type": "array",
            "description": "Paste video, Shorts, playlist or channel links (youtube.com/watch, youtu.be, /shorts, /playlist, /@handle, /channel/UC...). A bare 11-character video ID works too through the API. Channels and playlists are expanded into their videos.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "YouTube searches (optional)",
            "type": "array",
            "description": "Search YouTube and get transcripts for the top video results of each query.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Max videos per channel, playlist or search",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many videos to take from each channel, playlist or search query (newest first for channels).",
            "default": 10
          },
          "maxVideos": {
            "title": "Max videos in total (0 = no limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on the number of videos processed in this run, across all links and searches.",
            "default": 0
          },
          "channelTab": {
            "title": "Channel tab",
            "enum": [
              "videos",
              "shorts",
              "streams"
            ],
            "type": "string",
            "description": "Which tab to read when a link points to a channel.",
            "default": "videos"
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, e.g. en, de, pt-BR. The first one that exists is used.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "prefer_manual",
              "prefer_auto",
              "manual_only",
              "auto_only"
            ],
            "type": "string",
            "description": "Which caption track to use when a video has both creator-uploaded (manual) and YouTube auto-generated captions. The *_only options return a free 'caption_type_unavailable' row instead of falling back. Every row says which one you got in 'captionType' (manual / auto / translated).",
            "default": "prefer_manual"
          },
          "anyLanguageFallback": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "If none of your preferred languages exists, return whichever caption track the video has (flagged with a 'note') instead of a free 'language_unavailable' row.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to (optional)",
            "type": "string",
            "description": "Language code such as es, de, fr, ja or pt-BR. If the video has no captions in that language, YouTube's own caption translation is used. Leave empty for no translation.",
            "default": ""
          },
          "includeFullText": {
            "title": "Include plain text",
            "type": "boolean",
            "description": "Add a 'transcript' field with the whole transcript as one string.",
            "default": true
          },
          "includeSegments": {
            "title": "Include timestamped segments",
            "type": "boolean",
            "description": "Add a 'segments' array: start (seconds), duration, text.",
            "default": true
          },
          "includeSrt": {
            "title": "Include SRT subtitles",
            "type": "boolean",
            "description": "Add an 'srt' field.",
            "default": false
          },
          "includeVtt": {
            "title": "Include WebVTT subtitles",
            "type": "boolean",
            "description": "Add a 'vtt' field.",
            "default": false
          },
          "chunkSizeChars": {
            "title": "RAG chunk size (characters, 0 = off)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Add a 'chunks' array of consecutive transcript pieces of about this many characters, each with start and end seconds. 1000 to 2000 suits most embedding pipelines.",
            "default": 0
          },
          "includeMetadata": {
            "title": "Include video metadata",
            "type": "boolean",
            "description": "Title, channel, channel ID/URL, views, duration, keywords, thumbnail, isShort and the list of available caption languages (manual vs auto, translatable).",
            "default": true
          },
          "includePublishDate": {
            "title": "Include publish date and category",
            "type": "boolean",
            "description": "Adds publishDate, publishedAt (full timestamp), uploadDate, category and isFamilySafe from one small (~11 KB) extra request per video. Turn off for the fastest runs.",
            "default": true
          },
          "includeDescription": {
            "title": "Include video description",
            "type": "boolean",
            "description": "Add the video description text.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used only when YouTube blocks the direct connection (bot check, HTTP 403/429): the Actor then switches to this proxy for the rest of the run and rotates IPs on every further block. Residential works best on YouTube. If residential is not available on your plan the Actor falls back to the Apify datacenter proxy. The default uses US residential IPs, so region-locked videos (common for music) behave like they do for a US viewer.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          },
          "tryDirectFirst": {
            "title": "Try without proxy first",
            "type": "boolean",
            "description": "Start without a proxy and switch to the proxy above only after the first block. Turn off to use the proxy for every request from the start.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos are fetched at the same time. 8 is fast and gentle; raise it for big batches, lower it if you see many 'blocked' rows.",
            "default": 8
          },
          "detectShorts": {
            "title": "Detect Shorts",
            "type": "boolean",
            "description": "For videos up to 3 minutes, check whether it is a YouTube Short and set 'isShort' (one tiny HEAD request). Links from /shorts/ and the channel Shorts tab are marked automatically.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}