{
  "openapi": "3.1.0",
  "info": {
    "title": "ExploreWorldAI 欧盟合规与统计插件（Coze / 扣子）",
    "description": "查询欧盟 GPSR、AI 法案、GDPR 中文结构化答案以及 Eurostat 欧盟统计与法规目录。第一级免费开放，无需密钥；每条结果自带官方出处链接与核对日期。",
    "version": "1.2.0"
  },
  "servers": [
    {
      "url": "https://guhdexlcewpmmqcgscvt.supabase.co/functions/v1/agent-api/v1"
    }
  ],
  "paths": {
    "/answer": {
      "get": {
        "operationId": "answerEuZh",
        "summary": "查询欧盟 GPSR、AI 法案、GDPR 中文答案（附官方出处与核对日期）",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "中文或英文问题，例如：GPSR 欧盟责任人、AI 法案第 50 条"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "zh"
            }
          },
          {
            "name": "budget",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                100,
                250,
                500
              ],
              "default": 250
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 3
            }
          }
        ],
        "responses": {
          "200": {
            "description": "带官方来源链接、核对日期与免责声明的结构化 JSON"
          }
        }
      }
    },
    "/stats": {
      "get": {
        "operationId": "euStatistics",
        "summary": "读取 Eurostat 欧盟国家统计（人口、失业率、通胀、GDP）",
        "parameters": [
          {
            "name": "dataset",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "population"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "DE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eurostat 统计快照 JSON"
          }
        }
      }
    },
    "/rules": {
      "get": {
        "operationId": "euRulesSearch",
        "summary": "按条款或法条检索欧盟法规（AI Act、GPSR、GDPR、DSA、NIS2）",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "example": "AI Act Article 50"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "zh"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "带 CELEX 与 EUR-Lex 链接的法规条目 JSON"
          }
        }
      }
    }
  }
}
