{
  "openapi": "3.1.0",
  "info": {
    "title": "日本热搜观察 / JP MONITOR API",
    "version": "2.1.0",
    "description": "日本实时热搜与跨国舆情看板开放接口：支持 Markdown / RSS / JSON Feed / 结构化过滤导出及单题深挖。"
  },
  "servers": [
    {
      "url": "https://jp.ouuut.com"
    }
  ],
  "paths": {
    "/index.md": {
      "get": {
        "operationId": "getMarkdownSnapshot",
        "summary": "获取当日或指定日期的全量纯净 Markdown 快照（最适合 LLM 直接吞入）",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "JP",
                "CN"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "news",
                "social",
                "video",
                "knowledge"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "text/markdown"
          }
        }
      }
    },
    "/api/v1/export": {
      "get": {
        "operationId": "exportFilteredItems",
        "summary": "按地区、体裁、分类、关键词和日期筛选导出全站热搜",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "JP",
                "CN"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "news",
                "social",
                "video",
                "knowledge"
              ]
            }
          },
          {
            "name": "cat",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "md",
                "rss",
                "jsonfeed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered structured data"
          }
        }
      }
    },
    "/api/v1/digest/today": {
      "get": {
        "operationId": "getTodayDigest",
        "summary": "获取当日焦点卡与各数据源 Top5 汇总",
        "responses": {
          "200": {
            "description": "JSON digest"
          }
        }
      }
    },
    "/api/v1/topics": {
      "get": {
        "operationId": "listTopics",
        "summary": "列出全部可选话题与编号",
        "responses": {
          "200": {
            "description": "Topic list"
          }
        }
      }
    },
    "/api/v1/topics/{id}": {
      "get": {
        "operationId": "getTopicDetail",
        "summary": "获取单条话题完整双语内容与来源链接",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Single topic detail"
          }
        }
      }
    },
    "/api/v1/dates": {
      "get": {
        "operationId": "listArchiveDates",
        "summary": "获取所有分日存档日期及条目数",
        "responses": {
          "200": {
            "description": "Date list"
          }
        }
      }
    },
    "/rss.xml": {
      "get": {
        "operationId": "getRssFeed",
        "summary": "标准 RSS 2.0 订阅源（支持 ?region=&type=&cat=&q=）",
        "responses": {
          "200": {
            "description": "application/rss+xml"
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "operationId": "getJsonFeed",
        "summary": "标准 JSON Feed 1.1（支持 ?region=&type=&cat=&q=）",
        "responses": {
          "200": {
            "description": "application/feed+json"
          }
        }
      }
    },
    "/api/v1/curation/pending": {
      "get": {
        "operationId": "getPendingCuration",
        "summary": "维护巡检专用：返回待精译日文条目、当前焦点卡、死源警告与冷却统计",
        "responses": {
          "200": {
            "description": "Pending curation pack"
          }
        }
      }
    },
    "/api/v1/items/batch": {
      "patch": {
        "operationId": "patchItemsBatch",
        "summary": "批量精修中文标题/备注/隐藏噪音（传入 {items: [{id,title_zh,context_note,hidden}]}）",
        "responses": {
          "200": {
            "description": "Batch update result"
          }
        }
      }
    },
    "/api/v1/focus/upsert": {
      "post": {
        "operationId": "upsertFocusCard",
        "summary": "新增或覆盖今日焦点卡",
        "responses": {
          "200": {
            "description": "Focus card upsert result"
          }
        }
      }
    },
    "/api/v1/structural/upsert": {
      "post": {
        "operationId": "upsertStructuralIssue",
        "summary": "向「社会档案」追加新长青争议母题 (S-111+) 或追记事实补丁",
        "responses": {
          "200": {
            "description": "Structural issue upsert result"
          }
        }
      }
    },
    "/api/v1/topics/{id}/consume": {
      "post": {
        "operationId": "consumeTopic",
        "summary": "成稿后标记话题已消费并开启冷却期 (cooldown_days)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Consume receipt"
          }
        }
      }
    },
    "/api/v1/sources/config": {
      "post": {
        "operationId": "configSourceKeywords",
        "summary": "动态增删采集关键词或屏蔽词 ({action:add|remove, source:bilibili|keywords|block, value:...})",
        "responses": {
          "200": {
            "description": "Config updated"
          }
        }
      }
    }
  }
}