{
  "openapi": "3.0.0",
  "info": {
    "title": "YouTube视频字幕 API (V1)",
    "version": "1.0.0",
    "description": "通过TIKHUB获取YouTube视频字幕数据，包括可用的字幕轨道或格式化的内容（SRT、XML、JSON3或纯文本），用于转录、本地化、可访问性审查和内容分析。"
  },
  "servers": [
    {
      "url": "https://api.justoneapi.com",
      "description": "prod-global（默认）"
    },
    {
      "url": "http://47.117.133.51:30015",
      "description": "prod-cn（中国大陆地区可选）"
    }
  ],
  "paths": {
    "/api/youtube/get-video-captions/v1": {
      "get": {
        "tags": [
          "YouTube"
        ],
        "summary": "视频字幕",
        "description": "通过TIKHUB获取YouTube视频字幕数据，包括可用的字幕轨道或格式化的内容（SRT、XML、JSON3或纯文本），用于转录、本地化、可访问性审查和内容分析。",
        "operationId": "getApiYoutubeGetVideoCaptionsV1",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "此 API 服务的访问令牌。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "videoId",
            "in": "query",
            "description": "YouTube视频的唯一标识符。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageCode",
            "in": "query",
            "description": "字幕语言代码，例如en、zh-Hans或a.en。留空以检索可用的字幕轨道。",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "字幕输出格式。\n\n可用值：\n- `srt`：带时间轴提示的SubRip字幕格式\n- `xml`：原始XML字幕格式\n- `json3`：YouTube原始JSON字幕结构\n- `txt`：不带时间轴提示的纯文本",
            "required": false,
            "schema": {
              "type": "string",
              "default": "srt",
              "description": "YouTube caption output format",
              "enum": [
                "srt",
                "xml",
                "json3",
                "txt"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "好的",
            "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": {}
}