{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/youtubetranscriptapi-com/json-schema/youtubetranscriptapi-com-transcript-schema.json",
  "title": "Transcript",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/youtubetranscriptapi-com-openapi.json#/components/schemas/Transcript",
  "type": "object",
  "required": [
    "video_id",
    "language",
    "transcript"
  ],
  "properties": {
    "video_id": {
      "type": "string",
      "description": "11-character YouTube video ID."
    },
    "language": {
      "type": [
        "string",
        "null"
      ],
      "description": "Language code of the returned caption track. Can differ from the requested language."
    },
    "transcript": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TranscriptSegment"
          },
          "description": "format=json"
        },
        {
          "type": "string",
          "description": "format=text: one line per segment, each prefixed with [start s] when include_timestamp is true."
        }
      ]
    },
    "metadata": {
      "$ref": "#/$defs/TranscriptMetadata",
      "description": "Present when send_metadata is true."
    }
  },
  "$defs": {
    "TranscriptMetadata": {
      "type": "object",
      "required": [
        "title",
        "author_name",
        "author_url",
        "thumbnail_url"
      ],
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Video title."
        },
        "author_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Channel name."
        },
        "author_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Channel URL."
        },
        "thumbnail_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Video thumbnail URL."
        }
      }
    },
    "TranscriptSegment": {
      "type": "object",
      "required": [
        "text"
      ],
      "description": "One caption line. start and duration are present when include_timestamp is true.",
      "properties": {
        "text": {
          "type": "string"
        },
        "start": {
          "type": "number",
          "description": "Start time in seconds."
        },
        "duration": {
          "type": "number",
          "description": "Duration in seconds."
        }
      }
    }
  }
}