{
  "openapi": "3.1.0",
  "info": {
    "title": "Give me five API",
    "version": "1.0.0",
    "description": "公开、只读、无需 API Key 的投资视频及播客文字与分析接口。RiskReversal Pod 在 videos 目录内以 media_type=podcast 提供；audio_url、youtube_url、feed_url 与 transcript.source_url 记录各版本来源。"
  },
  "servers": [
    {
      "url": "https://give-me-five.hupengresearch.com"
    }
  ],
  "paths": {
    "/api/v1/channels": {
      "get": {
        "summary": "频道与监控来源目录",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/v1/videos": {
      "get": {
        "summary": "分页读取视频及逐篇播客分析",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "updated_desc",
                "updated_asc",
                "published_desc",
                "published_asc"
              ],
              "default": "updated_desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid query"
          }
        }
      }
    },
    "/api/v1/videos/{id}": {
      "get": {
        "summary": "读取单篇完整分析与逐字稿",
        "description": "按文章版本提供 research_digest 与 production。speaker-content-lite-v1 新稿使用 speakerViews（name、role、points）与 sections（主要议题正文），tldr 为空，stages 为空；summary-lite-v1 / research-v2 历史格式保持原样。verificationNotes 和 downloadUrl 记录来源说明与整理 MD。",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "summary": "搜索摘要、观点与完整逐字稿",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid query"
          }
        }
      }
    },
    "/api/v1/ubs": {
      "get": {
        "summary": "UBS 最新 12 小时合并稿与历史汇总",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/feed-index": {
      "get": {
        "summary": "全量紧凑目录",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}