{
  "openapi": "3.1.0",
  "info": {
    "title": "SeekFlaw 求瑕 开放只读接口",
    "version": "1.0.0",
    "summary": "官方导图、考前冲刺页的只读 JSON 接口（无需密钥）",
    "description": "SeekFlaw 求瑕 的开放面只读，无需注册或密钥，数据都是站内公开页面上已经有的内容：官方导图专题、考前冲刺页，以及共享中心里 SeekFlaw 编辑团队账号发布并通过审核的导图（slug 形如 c/<id>，永久链接是它已收录的公开页）；不含其他用户的分享、不含个人空间。\n\n授权口径：允许引用与链接，须署名并回链；不允许整体搬运转载。每个返回里都带 license、attribution、canonical（永久链接），引用时请署名并附上 canonical。详见 https://www.seekflaw.com/developers#license。\n\n返回按 IP 限速，超限回 429 与 Retry-After；服务端有缓存，请带 If-None-Match 做条件请求。",
    "termsOfService": "https://www.seekflaw.com/developers#license",
    "contact": {
      "name": "SeekFlaw 求瑕",
      "url": "https://www.seekflaw.com/about"
    },
    "license": {
      "name": "署名引用，须回链；不允许整体搬运转载（开放内容使用说明，不是开源许可协议）",
      "url": "https://www.seekflaw.com/developers#license"
    }
  },
  "servers": [
    {
      "url": "https://www.seekflaw.com",
      "description": "生产"
    }
  ],
  "tags": [
    {
      "name": "maps",
      "description": "官方导图专题与编辑团队精选导图"
    },
    {
      "name": "exams",
      "description": "考前冲刺页（倒计时 + 突击清单）"
    },
    {
      "name": "embed",
      "description": "嵌入"
    },
    {
      "name": "mcp",
      "description": "只读 MCP 入口"
    }
  ],
  "paths": {
    "/api/open/v1/maps": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "listMaps",
        "summary": "导图列表 / 搜索 / 分页",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "搜索词（标题、摘要、标签、结论里找；空格分隔多个词，要求都出现）",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "group",
            "in": "query",
            "description": "导图分组名，例如「高中」「考研」",
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "zone",
            "in": "query",
            "description": "分区（默认排序里初中、高中、考研、考公四类在前）",
            "schema": {
              "type": "string",
              "enum": [
                "chuzhong",
                "gaozhong",
                "kaoyan",
                "kaogong",
                "cet",
                "jiaozi",
                "qimo",
                "fangfa"
              ]
            }
          },
          {
            "name": "stage",
            "in": "query",
            "description": "学段 / 考试人群：junior 初中、senior 高中、kaoyan 考研、gongkao 考公（对应分区 chuzhong / gaozhong / kaoyan / kaogong）；写错回 400",
            "schema": {
              "type": "string",
              "enum": [
                "junior",
                "senior",
                "kaoyan",
                "gongkao"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "每页条数，默认 20，最多 50",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "跳过前多少条",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "导图摘要列表",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapList"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "暂时不可用，稍后再试",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v1/maps/{slug}": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getMap",
        "summary": "一张导图（节点树 + 元数据）",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "导图详情",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapDetail"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条（或不在开放范围内）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "暂时不可用，稍后再试",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v1/maps/c/{id}": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getEditorialMap",
        "summary": "一张编辑团队精选导图（整棵节点树：每个节点的正面、背面要点，图与视频片段只给说明与出处）",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "编辑团队导图的开放 id（列表里 slug 形如 c/<id> 的 <id> 部分）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{6,12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "编辑团队导图详情",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditorialMapDetail"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条（或不在开放范围内）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "暂时不可用，稍后再试",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v1/exams": {
      "get": {
        "tags": [
          "exams"
        ],
        "operationId": "listExams",
        "summary": "考前冲刺页列表（不含已结束的）",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "搜索词（标题、摘要、标签、结论里找；空格分隔多个词，要求都出现）",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "zone",
            "in": "query",
            "description": "分区（默认排序里初中、高中、考研、考公四类在前）",
            "schema": {
              "type": "string",
              "enum": [
                "chuzhong",
                "gaozhong",
                "kaoyan",
                "kaogong",
                "cet",
                "jiaozi",
                "qimo",
                "fangfa"
              ]
            }
          },
          {
            "name": "stage",
            "in": "query",
            "description": "学段 / 考试人群：junior 初中、senior 高中、kaoyan 考研、gongkao 考公（对应分区 chuzhong / gaozhong / kaoyan / kaogong）；写错回 400",
            "schema": {
              "type": "string",
              "enum": [
                "junior",
                "senior",
                "kaoyan",
                "gongkao"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "每页条数，默认 20，最多 50",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "跳过前多少条",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "考试摘要列表",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExamList"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "暂时不可用，稍后再试",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/open/v1/exams/{slug}": {
      "get": {
        "tags": [
          "exams"
        ],
        "operationId": "getExam",
        "summary": "一个考试的倒计时与突击清单",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "考试详情",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExamDetail"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条（或不在开放范围内）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "暂时不可用，稍后再试",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/maps/{slug}.md": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getMapMarkdown",
        "summary": "导图的 Markdown 大纲（含来源与回链）",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/maps/{slug}.json": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getMapJsonView",
        "summary": "导图的 JSON 视图（与接口详情同一个形状）",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "导图详情",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapDetail"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条（或不在开放范围内）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/maps/{slug}.opml": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getMapOpml",
        "summary": "导图的 OPML 2.0（可导入大纲 / 思维导图软件）",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OPML 2.0",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/x-opml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/maps/c/{id}.md": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getEditorialMapMarkdown",
        "summary": "编辑团队导图的 Markdown 大纲（每个节点的正面与背面要点；canonical 指向已收录的公开页）",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "编辑团队导图的开放 id（列表里 slug 形如 c/<id> 的 <id> 部分）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{6,12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/maps/c/{id}.json": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getEditorialMapJsonView",
        "summary": "编辑团队导图的 JSON 视图（与接口详情同一个形状）",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "编辑团队导图的开放 id（列表里 slug 形如 c/<id> 的 <id> 部分）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{6,12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "编辑团队导图详情",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EditorialMapDetail"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条（或不在开放范围内）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/maps/c/{id}.opml": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getEditorialMapOpml",
        "summary": "编辑团队导图的 OPML 2.0（背面写在 _note 里）",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "编辑团队导图的开放 id（列表里 slug 形如 c/<id> 的 <id> 部分）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]{6,12}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OPML 2.0",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/x-opml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/exam/{slug}.md": {
      "get": {
        "tags": [
          "exams"
        ],
        "operationId": "getExamMarkdown",
        "summary": "考试倒计时与突击清单的 Markdown",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/q/{slug}.md": {
      "get": {
        "tags": [
          "maps"
        ],
        "operationId": "getQaMarkdown",
        "summary": "一条学习问答的 Markdown",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "内容的 slug（小写字母、数字、连字符）",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/oembed": {
      "get": {
        "tags": [
          "embed"
        ],
        "operationId": "oembed",
        "summary": "oEmbed（type=rich，iframe 指向 /embed/maps/{slug}）",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "导图页地址，形如 https://www.seekflaw.com/maps/<slug>；编辑团队导图也可用 https://www.seekflaw.com/maps/c/<id> 或它已收录的公开页 https://www.seekflaw.com/share/<shareId>",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "只支持 json",
            "schema": {
              "type": "string",
              "enum": [
                "json"
              ]
            }
          },
          {
            "name": "maxwidth",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 200,
              "maximum": 1200
            }
          },
          {
            "name": "maxheight",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 200,
              "maximum": 1200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "oEmbed rich",
            "headers": {
              "ETag": {
                "description": "内容指纹；下次请求带 If-None-Match 可得 304",
                "schema": {
                  "type": "string"
                }
              },
              "Cache-Control": {
                "description": "public，约 10 分钟",
                "schema": {
                  "type": "string"
                }
              },
              "Access-Control-Allow-Origin": {
                "description": "恒为 *",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OEmbed"
                }
              }
            }
          },
          "400": {
            "description": "缺少 url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "没有这一条（或不在开放范围内）",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "不支持这种 format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/open/mcp": {
      "post": {
        "tags": [
          "mcp"
        ],
        "operationId": "mcp",
        "summary": "只读 MCP（Streamable HTTP，无状态；工具：search_maps、get_map、get_exam_plan）",
        "description": "请求体是单条 JSON-RPC 2.0 消息，协议版本见响应；支持 2026-07-28、2025-11-25、2025-06-18、2025-03-26。发现文件：https://www.seekflaw.com/.well-known/ai-catalog.json。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 响应",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "202": {
            "description": "通知已收下，无内容"
          },
          "400": {
            "description": "请求头与请求体不一致，或协议版本不支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "请求太频繁",
            "headers": {
              "Retry-After": {
                "description": "多少秒后再试",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "License": {
        "type": "object",
        "required": [
          "summary",
          "attributionRequired",
          "backlinkRequired",
          "redistributionAllowed",
          "url"
        ],
        "properties": {
          "summary": {
            "type": "string"
          },
          "attributionRequired": {
            "type": "boolean"
          },
          "backlinkRequired": {
            "type": "boolean"
          },
          "redistributionAllowed": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Attribution": {
        "type": "object",
        "required": [
          "name",
          "url",
          "text"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "text": {
            "type": "string"
          }
        }
      },
      "Formats": {
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "format": "uri"
        },
        "description": "同一条内容的其它格式地址（html / markdown / json / opml / embed / api）"
      },
      "OutlineNode": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutlineNode"
            }
          }
        }
      },
      "MapSummary": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "group",
          "zone",
          "stage",
          "audience",
          "description",
          "tags",
          "published",
          "updated",
          "canonical",
          "formats"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "zone": {
            "type": "string",
            "enum": [
              "chuzhong",
              "gaozhong",
              "kaoyan",
              "kaogong",
              "cet",
              "jiaozi",
              "qimo",
              "fangfa"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "junior",
              "senior",
              "kaoyan",
              "gongkao",
              null
            ],
            "description": "学段 / 考试人群：初中 junior、高中 senior、考研 kaoyan、考公 gongkao；其它分区为 null"
          },
          "audience": {
            "type": [
              "string",
              "null"
            ],
            "description": "人群说明：初中生 / 高中生 / 考研备考生 / 公务员考试备考生；其它分区为 null"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "published": {
            "type": "string",
            "format": "date"
          },
          "updated": {
            "type": "string",
            "format": "date"
          },
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "formats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "MapDetail": {
        "type": "object",
        "required": [
          "type",
          "slug",
          "title",
          "group",
          "zone",
          "stage",
          "audience",
          "description",
          "conclusion",
          "scope",
          "tags",
          "outline",
          "basis",
          "published",
          "updated",
          "canonical",
          "formats",
          "license",
          "attribution"
        ],
        "properties": {
          "type": {
            "const": "map"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "zone": {
            "type": "string",
            "enum": [
              "chuzhong",
              "gaozhong",
              "kaoyan",
              "kaogong",
              "cet",
              "jiaozi",
              "qimo",
              "fangfa"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "junior",
              "senior",
              "kaoyan",
              "gongkao",
              null
            ],
            "description": "学段 / 考试人群：初中 junior、高中 senior、考研 kaoyan、考公 gongkao；其它分区为 null"
          },
          "audience": {
            "type": [
              "string",
              "null"
            ],
            "description": "人群说明：初中生 / 高中生 / 考研备考生 / 公务员考试备考生；其它分区为 null"
          },
          "description": {
            "type": "string"
          },
          "conclusion": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutlineNode"
            }
          },
          "basis": {
            "type": "string"
          },
          "published": {
            "type": "string",
            "format": "date"
          },
          "updated": {
            "type": "string",
            "format": "date"
          },
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "formats": {
            "$ref": "#/components/schemas/Formats"
          },
          "license": {
            "$ref": "#/components/schemas/License"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "EditorialNode": {
        "type": "object",
        "required": [
          "id",
          "front"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "front": {
            "type": "string",
            "description": "节点正面（标题 / 问题）"
          },
          "back": {
            "type": "string",
            "description": "背面要点（纯文本，公式为 $…$ 源码）"
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "alt"
              ],
              "properties": {
                "alt": {
                  "type": "string"
                }
              }
            },
            "description": "配图只给 alt 说明，不给图片地址"
          },
          "videoClip": {
            "type": "object",
            "description": "视频片段只给出处说明（标题 / UP 主 / BV 号 / 起止），不转载视频",
            "properties": {
              "title": {
                "type": "string"
              },
              "owner": {
                "type": "string"
              },
              "bvid": {
                "type": "string"
              },
              "p": {
                "type": "integer"
              },
              "t0": {
                "type": "integer"
              },
              "t1": {
                "type": "integer"
              },
              "note": {
                "type": "string"
              }
            }
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EditorialNode"
            }
          }
        }
      },
      "EditorialMapSummary": {
        "type": "object",
        "required": [
          "type",
          "source",
          "slug",
          "id",
          "title",
          "zone",
          "stage",
          "audience",
          "exam",
          "description",
          "nodes",
          "cards",
          "images",
          "videoClips",
          "published",
          "updated",
          "canonical",
          "formats"
        ],
        "properties": {
          "type": {
            "const": "map"
          },
          "source": {
            "const": "editorial",
            "description": "来源：共享中心里 SeekFlaw 编辑团队账号发布并通过审核的导图"
          },
          "slug": {
            "type": "string",
            "pattern": "^c/[a-z0-9]{6,12}$"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "zone": {
            "type": "string",
            "enum": [
              "chuzhong",
              "gaozhong",
              "kaoyan",
              "kaogong",
              "cet",
              "jiaozi",
              "qimo",
              "fangfa"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "junior",
              "senior",
              "kaoyan",
              "gongkao",
              null
            ]
          },
          "audience": {
            "type": [
              "string",
              "null"
            ]
          },
          "exam": {
            "type": [
              "string",
              "null"
            ],
            "description": "考试族（考研 / 公务员考试 / 大学英语四六级 / 教师资格证 / 大学期末考试）；初中、高中不写具体考试"
          },
          "description": {
            "type": "string",
            "description": "简介（编辑团队署名句开头）"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "nodes": {
            "type": "integer"
          },
          "cards": {
            "type": "integer"
          },
          "images": {
            "type": "integer"
          },
          "videoClips": {
            "type": "integer"
          },
          "published": {
            "type": "string",
            "format": "date"
          },
          "updated": {
            "type": "string",
            "format": "date"
          },
          "canonical": {
            "type": "string",
            "format": "uri",
            "description": "永久链接 = 已收录的公开页（/share/<shareId>）"
          },
          "formats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "EditorialMapDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EditorialMapSummary"
          },
          {
            "type": "object",
            "required": [
              "outline",
              "license",
              "attribution"
            ],
            "properties": {
              "outline": {
                "$ref": "#/components/schemas/EditorialNode"
              },
              "license": {
                "$ref": "#/components/schemas/License"
              },
              "attribution": {
                "$ref": "#/components/schemas/Attribution"
              }
            }
          }
        ]
      },
      "MapList": {
        "type": "object",
        "required": [
          "total",
          "limit",
          "offset",
          "items",
          "canonical",
          "license",
          "attribution"
        ],
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/EditorialMapSummary"
                },
                {
                  "$ref": "#/components/schemas/MapSummary"
                }
              ]
            }
          },
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "license": {
            "$ref": "#/components/schemas/License"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "ExamDate": {
        "type": "object",
        "required": [
          "text",
          "ymd",
          "endYmd",
          "sources"
        ],
        "properties": {
          "text": {
            "type": "string"
          },
          "ymd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "endYmd": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "url"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "ExamSummary": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "description",
          "zone",
          "stage",
          "audience",
          "examDate",
          "daysLeft",
          "ended",
          "updated",
          "canonical",
          "formats"
        ],
        "properties": {
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "zone": {
            "type": "string",
            "enum": [
              "chuzhong",
              "gaozhong",
              "kaoyan",
              "kaogong",
              "cet",
              "jiaozi",
              "qimo",
              "fangfa"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "junior",
              "senior",
              "kaoyan",
              "gongkao",
              null
            ],
            "description": "学段 / 考试人群：初中 junior、高中 senior、考研 kaoyan、考公 gongkao；其它分区为 null"
          },
          "audience": {
            "type": [
              "string",
              "null"
            ],
            "description": "人群说明：初中生 / 高中生 / 考研备考生 / 公务员考试备考生；其它分区为 null"
          },
          "examDate": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "text": {
                "type": "string"
              },
              "ymd": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "endYmd": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "daysLeft": {
            "type": [
              "integer",
              "null"
            ],
            "description": "距考试首日还有几天（北京时间）；没有统一考试日期 = null"
          },
          "ended": {
            "type": "boolean"
          },
          "updated": {
            "type": "string",
            "format": "date"
          },
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "formats": {
            "$ref": "#/components/schemas/Formats"
          }
        }
      },
      "ExamDetail": {
        "type": "object",
        "required": [
          "type",
          "slug",
          "title",
          "description",
          "conclusion",
          "zone",
          "stage",
          "audience",
          "tags",
          "examDate",
          "daysLeft",
          "ended",
          "plan",
          "sources",
          "published",
          "updated",
          "canonical",
          "formats",
          "license",
          "attribution"
        ],
        "properties": {
          "type": {
            "const": "exam"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "conclusion": {
            "type": "string"
          },
          "zone": {
            "type": "string",
            "enum": [
              "chuzhong",
              "gaozhong",
              "kaoyan",
              "kaogong",
              "cet",
              "jiaozi",
              "qimo",
              "fangfa"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "junior",
              "senior",
              "kaoyan",
              "gongkao",
              null
            ],
            "description": "学段 / 考试人群：初中 junior、高中 senior、考研 kaoyan、考公 gongkao；其它分区为 null"
          },
          "audience": {
            "type": [
              "string",
              "null"
            ],
            "description": "人群说明：初中生 / 高中生 / 考研备考生 / 公务员考试备考生；其它分区为 null"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "examDate": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExamDate"
              },
              {
                "type": "null"
              }
            ]
          },
          "daysLeft": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ended": {
            "type": "boolean"
          },
          "plan": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "text"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "published": {
            "type": "string",
            "format": "date"
          },
          "updated": {
            "type": "string",
            "format": "date"
          },
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "formats": {
            "$ref": "#/components/schemas/Formats"
          },
          "license": {
            "$ref": "#/components/schemas/License"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "ExamList": {
        "type": "object",
        "required": [
          "total",
          "limit",
          "offset",
          "items",
          "canonical",
          "license",
          "attribution"
        ],
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExamSummary"
            }
          },
          "canonical": {
            "type": "string",
            "format": "uri"
          },
          "license": {
            "$ref": "#/components/schemas/License"
          },
          "attribution": {
            "$ref": "#/components/schemas/Attribution"
          }
        }
      },
      "OEmbed": {
        "type": "object",
        "required": [
          "version",
          "type",
          "provider_name",
          "provider_url",
          "title",
          "html",
          "width",
          "height"
        ],
        "properties": {
          "version": {
            "const": "1.0"
          },
          "type": {
            "const": "rich"
          },
          "provider_name": {
            "type": "string"
          },
          "provider_url": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "author_name": {
            "type": "string"
          },
          "author_url": {
            "type": "string",
            "format": "uri"
          },
          "html": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "cache_age": {
            "type": "integer"
          },
          "license": {
            "type": "string"
          }
        }
      }
    }
  }
}
