{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Channels, SRT & VTT",
    "description": "Get YouTube transcripts, subtitles and captions as text, timed segments, SRT or VTT, with video details, from videos, Shorts, live replays, playlists and whole channels. Manual and auto-generated captions in any language, optional auto-translation. Pay only for transcripts delivered.",
    "version": "0.1",
    "x-build-id": "KAnt0wt8ZL9XQeTOt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zaiq~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zaiq-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/zaiq~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zaiq-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/zaiq~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zaiq-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": {
          "videos": {
            "title": "YouTube videos",
            "type": "array",
            "description": "Video links or 11-character video IDs, one per line. Watch, youtu.be, Shorts, embed and live links all work. Playlist and channel links pasted here are listed too.",
            "items": {
              "type": "string"
            }
          },
          "channelsOrPlaylists": {
            "title": "Channels or playlists",
            "type": "array",
            "description": "Optional. Channel links (@handle, /channel/UC..., /c/..., /user/...) or playlist links (...?list=PL...). Their videos are listed newest first, up to the limit below for each.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerSource": {
            "title": "Videos per channel or playlist",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The newest videos are taken first.",
            "default": 20
          },
          "channelContent": {
            "title": "From channels, take",
            "enum": [
              "videos",
              "shorts",
              "streams",
              "all"
            ],
            "type": "string",
            "description": "Which of a channel's uploads to list. A channel link ending in /shorts or /streams overrides this. YouTube lists at most the latest 40 Shorts per channel to visitors who are not signed in.",
            "default": "videos"
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Language codes in order of preference, for example en, es, de, pt-BR. The first one the video has is returned. Leave empty for the language spoken in the video.",
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "If none of those, return the video's own language",
            "type": "boolean",
            "description": "Off: a video without captions in your languages comes back as language-unavailable (free), with the languages it does have.",
            "default": true
          },
          "captionType": {
            "title": "Caption type",
            "enum": [
              "manual-first",
              "auto-first",
              "manual-only",
              "auto-only"
            ],
            "type": "string",
            "description": "Manual captions are uploaded by the channel; auto-generated ones come from YouTube's speech recognition.",
            "default": "manual-first"
          },
          "translateTo": {
            "title": "Translate to (YouTube auto-translate)",
            "type": "string",
            "description": "Optional. Return the transcript in this language. If the video has captions in it, those are used; otherwise YouTube's own auto-translation is requested. YouTube rate-limits auto-translation, so some may fail; then the original transcript is returned and charged at the normal price."
          },
          "outputFormats": {
            "title": "Transcript formats",
            "type": "array",
            "description": "Plain text, timed segments (start and duration in seconds), SRT and WebVTT subtitle files. Very long SRT or VTT files are stored in the run's key-value store and linked from the row.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "segments",
                "srt",
                "vtt"
              ],
              "enumTitles": [
                "Plain text",
                "Timed segments (JSON)",
                "SRT subtitles",
                "WebVTT subtitles"
              ]
            },
            "default": [
              "text",
              "segments"
            ]
          },
          "includeTimestamps": {
            "title": "Timestamps in the text",
            "type": "boolean",
            "description": "Start each line of the plain text with its time, like [01:23]. Off: one continuous text.",
            "default": false
          },
          "includeMetadata": {
            "title": "Video details",
            "type": "boolean",
            "description": "Add publish and upload dates, likes, category, full description, tags, thumbnail and channel link. Title, channel, duration, publish date and views are always included.",
            "default": true
          },
          "wordTimestamps": {
            "title": "Word-level timestamps",
            "type": "boolean",
            "description": "For auto-generated captions, add each word's start time inside the timed segments.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "YouTube asks data-centre addresses to sign in far more often, so residential proxies are the default. Pick a country if you need videos available only there.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Videos at once",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many videos are fetched at the same time.",
            "default": 10
          },
          "maxTries": {
            "title": "Tries per video",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "When YouTube blocks a request, the video is tried again from a new address, up to this many times. Blocked tries are free.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}