{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/transcript-yt-com/json-schema/transcript-yt-com-transcript-schema.json",
  "title": "Transcript",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/transcript-yt-com-openapi.json#/components/schemas/Transcript",
  "type": "object",
  "properties": {
    "videoId": {
      "type": "string"
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "author": {
      "type": [
        "string",
        "null"
      ]
    },
    "channelId": {
      "type": [
        "string",
        "null"
      ]
    },
    "durationSeconds": {
      "type": "number"
    },
    "language": {
      "type": "string",
      "description": "Language delivered (the target when translated)."
    },
    "translated": {
      "type": "boolean"
    },
    "autoGenerated": {
      "type": "boolean"
    },
    "source": {
      "type": "string",
      "enum": [
        "captions",
        "speech_to_text"
      ]
    },
    "segments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Segment"
      }
    },
    "text": {
      "type": "string"
    },
    "availableLanguages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "languageCode",
          "languageName",
          "autoGenerated"
        ],
        "properties": {
          "languageCode": {
            "type": "string"
          },
          "languageName": {
            "type": "string"
          },
          "autoGenerated": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "$defs": {
    "Segment": {
      "type": "object",
      "required": [
        "start",
        "duration",
        "end",
        "timestamp",
        "text"
      ],
      "properties": {
        "start": {
          "type": "number",
          "description": "Seconds"
        },
        "duration": {
          "type": "number",
          "description": "Seconds"
        },
        "end": {
          "type": "number",
          "description": "Seconds"
        },
        "timestamp": {
          "type": "string",
          "description": "Readable start time, e.g. 1:23 or 1:02:03"
        },
        "text": {
          "type": "string"
        }
      }
    }
  }
}