{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Bulk, SRT, Channels, Playlists",
    "description": "Get YouTube transcripts and subtitles for videos, Shorts, playlists, channels and search results. Timestamps, plain text, SRT/VTT, RAG chunks, any language or free auto-translation. Videos without captions are free. No API key.",
    "version": "1.0",
    "x-build-id": "wjnec81W8Xx3H6Afv"
  },
  "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"
            }
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Use captions uploaded by the creator when they exist, otherwise YouTube's automatic captions. Turn off to prefer automatic captions.",
            "default": true
          },
          "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 in the row) instead of an empty free 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, views, duration, keywords, thumbnail and the list of available caption languages.",
            "default": true
          },
          "includePublishDate": {
            "title": "Include publish date",
            "type": "boolean",
            "description": "Adds the publish date (one 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": "YouTube blocks most datacenter IPs, so the default is Apify Residential proxy (about 20 KB per video, roughly $0.0002 per video billed by Apify on top of the event price). If residential is not available on your plan the Actor falls back to the datacenter proxy, which fails on a large share of videos.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "tryDirectFirst": {
            "title": "Try a direct connection first",
            "type": "boolean",
            "description": "Only useful when running outside Apify or from a clean IP. On the Apify platform YouTube blocks direct connections, so leave this off.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}