{
  "openapi": "3.1.0",
  "info": {
    "title": "YouTube通用搜索 API (V1)",
    "version": "v0",
    "description": "按关键词搜索YouTube视频，支持可选的语言、上传日期、时长和排序筛选条件，或使用分页令牌继续浏览。可用于发现公开视频或浏览更多结果页。"
  },
  "servers": [
    {
      "url": "https://api.justoneapi.com",
      "description": "全球生产 API（默认）"
    }
  ],
  "tags": [
    {
      "name": "YouTube",
      "description": "YouTube频道上传和视频详情，用于内容索引、创作者监控和媒体分析。",
      "x-platform-id": "youtube",
      "x-platform-aliases": [
        "YouTube",
        "油管"
      ],
      "x-platform-detection-aliases": [
        "YouTube",
        "油管"
      ]
    }
  ],
  "paths": {
    "/api/youtube/search/v1": {
      "get": {
        "tags": [
          "YouTube"
        ],
        "summary": "通用搜索",
        "description": "按关键词搜索YouTube视频，支持可选的语言、上传日期、时长和排序筛选条件，或使用分页令牌继续浏览。可用于发现公开视频或浏览更多结果页。",
        "operationId": "getApiYoutubeSearchV1",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "description": "此 API 服务的访问令牌。",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keyword",
            "in": "query",
            "description": "搜索词。第一页必填；使用 nextToken 时留空。",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "可选 IETF 语言标签，用于本地化结果，例如 en-US。留空则使用默认语言。",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uploadDate",
            "in": "query",
            "description": "上传日期过滤条件。\n\n可用值：\n- `all`: 无上传日期限制\n- `lastHour`: 最近一小时上传\n- `today`: 今天上传\n- `thisWeek`: 本周上传\n- `thisMonth`: 本月上传\n- `thisYear`: 今年上传",
            "required": false,
            "schema": {
              "type": "string",
              "default": "all",
              "description": "按上传日期筛选结果。",
              "enum": [
                "all",
                "lastHour",
                "today",
                "thisWeek",
                "thisMonth",
                "thisYear"
              ]
            }
          },
          {
            "name": "duration",
            "in": "query",
            "description": "视频时长筛选。\n\n可用值：\n- `all`：不限时长\n- `short`：4分钟以下的短视频\n- `medium`：4至20分钟的中等长度视频\n- `long`：20分钟以上的长视频",
            "required": false,
            "schema": {
              "type": "string",
              "default": "all",
              "description": "按时长筛选视频结果。",
              "enum": [
                "all",
                "short",
                "medium",
                "long"
              ]
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "搜索结果的排序顺序。\n\n可用值：\n- `relevance`: 按相关性排序\n- `uploadDate`: 按上传日期排序\n- `viewCount`: 按观看次数排序\n- `rating`: 按评分排序",
            "required": false,
            "schema": {
              "type": "string",
              "default": "relevance",
              "description": "搜索结果的排序顺序。",
              "enum": [
                "relevance",
                "uploadDate",
                "viewCount",
                "rating"
              ]
            }
          },
          {
            "name": "nextToken",
            "in": "query",
            "description": "上一个响应返回的分页令牌。当提供时，关键词和过滤参数将被忽略；非常长的令牌可能超过 GET URL 的长度限制。",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "好的",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "请求参数或请求体无效",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "访问令牌无效或未激活",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "权限不足",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "请求速率或每日配额已超限",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "服务器内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "服务暂时不可用",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "format": "int32",
                      "enum": [
                        0,
                        100,
                        101,
                        202,
                        300,
                        301,
                        302,
                        303,
                        400,
                        404,
                        500,
                        503,
                        600,
                        601,
                        602
                      ]
                    },
                    "message": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {},
                    "recordTime": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "data",
                    "message",
                    "recordTime"
                  ]
                }
              }
            }
          }
        },
        "x-order": "25000900",
        "x-api-version": "v1",
        "x-search-aliases": [
          "YouTube search",
          "YouTube video search",
          "YouTube filtered search",
          "YouTube next token search",
          "YouTube localized search",
          "YouTube搜索",
          "YouTube视频搜索",
          "YouTube筛选搜索",
          "YouTube翻页搜索",
          "YouTube本地化搜索"
        ],
        "x-highlights": [],
        "x-endpoint-family": "youtube_search"
      }
    }
  }
}