{
  "openapi": "3.0.0",
  "info": {
    "title": "YouTube Video Captions API (V1)",
    "version": "1.0.0",
    "description": "Get YouTube video Captions data through TIKHUB, including available caption tracks or formatted content in SRT, XML, JSON3, or plain text for transcription, localization, accessibility review, and content analysis."
  },
  "servers": [
    {
      "url": "https://api.justoneapi.com",
      "description": "prod-global (default)"
    },
    {
      "url": "http://47.117.133.51:30015",
      "description": "prod-cn (optional for Mainland China)"
    }
  ],
  "paths": {
    "/api/youtube/get-video-captions/v1": {
      "get": {
        "tags": [
          "YouTube"
        ],
        "summary": "Video Captions",
        "description": "Get YouTube video Captions data through TIKHUB, including available caption tracks or formatted content in SRT, XML, JSON3, or plain text for transcription, localization, accessibility review, and content analysis.",
        "operationId": "getApiYoutubeGetVideoCaptionsV1",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "Access token for this API service.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "videoId",
            "in": "query",
            "description": "The unique identifier for a YouTube video.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "description": "Caption language code, such as en, zh-Hans, or a.en. Leave it empty to retrieve available caption tracks.",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Caption output format.\n\nAvailable Values:\n- `srt`: SubRip caption format with timeline cues\n- `xml`: Original XML caption format\n- `json3`: YouTube original JSON caption structure\n- `txt`: Plain text without timeline cues",
            "required": false,
            "schema": {
              "type": "string",
              "default": "srt",
              "description": "YouTube caption output format",
              "enum": [
                "srt",
                "xml",
                "json3",
                "txt"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "0",
                        "100",
                        "101",
                        "202",
                        "300",
                        "301",
                        "302",
                        "303",
                        "400",
                        "404",
                        "500",
                        "600",
                        "601"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object"
                    },
                    "recordTime": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "x-order": "25001002",
        "x-api-version": "v1",
        "x-highlights": []
      }
    }
  },
  "components": {}
}