{
  "openapi": "3.0.1",
  "info": {
    "title": "YouTube Transcript Scraper: Subtitles, SRT, VTT & Chunks",
    "description": "Scrape YouTube transcripts, subtitles and captions from videos, Shorts, playlists and channels, with views, likes and publish date on every row. Pick or translate languages and export text, timestamps, SRT, WebVTT or LLM-ready chunks. No charge for videos without captions.",
    "version": "0.0",
    "x-build-id": "czfUIwZvtDOR9VuWd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hxckya~youtube-transcript-subtitles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hxckya-youtube-transcript-subtitles-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/hxckya~youtube-transcript-subtitles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hxckya-youtube-transcript-subtitles-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/hxckya~youtube-transcript-subtitles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hxckya-youtube-transcript-subtitles-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": {
          "urls": {
            "title": "Videos, playlists or channels",
            "type": "array",
            "description": "One per line. Video or Shorts URLs, youtu.be links, 11-character video IDs, playlist URLs, or channels (https://www.youtube.com/@name, @name, or a channel URL). Playlists and channels are expanded into their videos.",
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Preferred languages",
            "type": "array",
            "description": "Caption languages to look for, in order of preference (ISO codes such as en, es, ko, pt-BR). The first one the video has is used.",
            "default": [
              "en"
            ],
            "items": {
              "type": "string"
            }
          },
          "fallbackToAnyLanguage": {
            "title": "Fall back to any available language",
            "type": "boolean",
            "description": "If none of the preferred languages exist, use the video's own captions instead of skipping it.",
            "default": true
          },
          "preferManualCaptions": {
            "title": "Prefer human-made captions",
            "type": "boolean",
            "description": "Use captions uploaded by the creator when both they and YouTube's automatic captions exist.",
            "default": true
          },
          "translateTo": {
            "title": "Translate to",
            "type": "string",
            "description": "Optional language code (for example en, ko, es, de). YouTube's own caption translation is used, so timestamps are kept. Leave empty to keep the original language."
          },
          "maxVideosPerSource": {
            "title": "Max videos per playlist or channel",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit for each playlist or channel you add. Newest uploads come first for channels.",
            "default": 50
          },
          "includeSegments": {
            "title": "Timed segments",
            "type": "boolean",
            "description": "Include every caption line with its start time and duration in seconds.",
            "default": true
          },
          "includeTimestampedText": {
            "title": "Timestamped text",
            "type": "boolean",
            "description": "Include a readable text with [mm:ss] markers, handy for notes and for citing a moment in LLM answers.",
            "default": false
          },
          "includeSrt": {
            "title": "SRT subtitles",
            "type": "boolean",
            "description": "Include the transcript as an SRT subtitle file.",
            "default": false
          },
          "includeVtt": {
            "title": "WebVTT subtitles",
            "type": "boolean",
            "description": "Include the transcript as a WebVTT subtitle file.",
            "default": false
          },
          "chunkChars": {
            "title": "AI chunk size (characters)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Split the transcript into chunks of about this many characters, each with its start and end time, ready for embeddings or RAG. 0 turns chunking off.",
            "default": 0
          },
          "includeDescription": {
            "title": "Video description",
            "type": "boolean",
            "description": "Include the video's description text.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Videos in parallel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many videos to process at the same time.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Requests go directly to YouTube first. If YouTube asks to confirm they are not from a bot (common from cloud servers), the run switches to this proxy automatically. Residential proxies work best.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "alwaysUseProxy": {
            "title": "Always use the proxy",
            "type": "boolean",
            "description": "Skip the direct attempt and send every request through the proxy.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}