{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper - video, channel and playlist",
    "description": "Get transcripts from YouTube videos, whole channels and playlists. Every video you ask for gets a row - with the transcript, or with the exact reason there is none. Rows without a transcript are never charged.",
    "version": "0.1",
    "x-build-id": "Qoc59LJ9veYmpm8Fc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marekhartmann~youtube-transcript-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marekhartmann-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/marekhartmann~youtube-transcript-scraper/runs": {
      "post": {
        "operationId": "runs-sync-marekhartmann-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/marekhartmann~youtube-transcript-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-marekhartmann-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": {
          "videoUrls": {
            "title": "Video URLs or IDs",
            "type": "array",
            "description": "YouTube videos to get transcripts for. Any of these forms works: a full watch URL, a youtu.be short link, a Shorts or embed URL, or the bare 11-character video ID.",
            "items": {
              "type": "string"
            }
          },
          "videoIds": {
            "title": "Video IDs",
            "type": "array",
            "description": "Bare 11-character YouTube video IDs, if you already have them. Equivalent to putting them in Video URLs - this field exists so you do not have to build URLs first.",
            "items": {
              "type": "string"
            }
          },
          "channelUrls": {
            "title": "Channel URLs",
            "type": "array",
            "description": "Channels to pull transcripts from. Accepts a handle (@handle), a /channel/UC... URL or an older /c/Name URL. Use 'Max videos per channel' to cap how many videos are taken from each one.",
            "items": {
              "type": "string"
            }
          },
          "playlistUrls": {
            "title": "Playlist URLs",
            "type": "array",
            "description": "Playlists to pull transcripts from. Accepts a full playlist URL or a bare playlist ID starting with PL, UU, OL or FL.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Transcript language",
            "type": "string",
            "description": "Two-letter language code of the transcript you want, for example en, sk, de or pt-BR. Leave empty to take whatever language the video offers first. If the video has no track in this language, the run still succeeds and the row lists the languages that ARE available."
          },
          "includeAutoGenerated": {
            "title": "Include auto-generated subtitles",
            "type": "boolean",
            "description": "Auto-generated (ASR) subtitles are on by default because most videos have nothing else. Turn this off to accept only subtitles a human uploaded - videos with ASR only will then get a row explaining that, and will not be charged.",
            "default": true
          },
          "transcriptFormat": {
            "title": "Transcript format",
            "enum": [
              "plain",
              "timestamps",
              "srt"
            ],
            "type": "string",
            "description": "plain - one continuous text block. timestamps - one line per caption prefixed with [HH:MM:SS]. srt - a ready-to-use subtitle file.",
            "default": "plain"
          },
          "includeSegments": {
            "title": "Include raw segments",
            "type": "boolean",
            "description": "Adds a segments array with the start time, duration and text of every caption. Useful for building your own format; makes rows considerably larger.",
            "default": false
          },
          "maxVideosPerChannel": {
            "title": "Max videos per channel or playlist",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of videos taken from each channel or playlist. Protects you from spending a whole budget on one large channel.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YouTube blocks datacentre IPs almost immediately, so a residential proxy is required rather than optional. This is measured, not assumed: with the datacentre default the very first request comes back as \"Sign in to confirm you are not a bot\". Leave this as it is unless you know your account has a better pool.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Generic list of YouTube URLs - videos, channels or playlists mixed together. Useful when the links come from another Actor or an integration. Each entry may be a plain string or an object with a url field.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}