{
  "openapi": "3.1.0",
  "info": {
    "title": "aihk.si Hong Kong AI Hub API",
    "version": "1.0.0",
    "description": "Public read-only REST API, RSS/JSON syndication feeds, iCalendar events, and stateless remote MCP server for Hong Kong AI news, ecosystem directory, Cantonese AI tool benchmarks, and events.",
    "contact": {
      "name": "aihk.si",
      "url": "https://aihk.si",
      "email": "hello@aihk.si"
    }
  },
  "servers": [
    {
      "url": "https://api.aihk.si",
      "description": "Cloudflare Workers production edge"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Service health and dataset freshness metadata",
        "responses": {
          "200": {
            "description": "Service status and counts"
          }
        }
      }
    },
    "/v1/edition": {
      "get": {
        "summary": "Current Harbour Edition front-page selection and wire headlines",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Edition overview JSON"
          }
        }
      }
    },
    "/v1/wire": {
      "get": {
        "summary": "Daily HK AI Wire dispatches (auto-refreshed daily at 08:00 HKT)",
        "parameters": [
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ecosystem",
                "policy",
                "research",
                "models",
                "funding"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive keyword filter matching English and Traditional Chinese fields.",
            "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
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated wire dispatches"
          }
        }
      }
    },
    "/v1/wire/{id}": {
      "get": {
        "summary": "Get a single Daily HK AI Wire dispatch by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wire dispatch item"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/v1/briefings": {
      "get": {
        "summary": "Evergreen Hong Kong AI briefings and field guides (alias: /v1/news)",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ecosystem",
                "guide",
                "policy",
                "research"
              ]
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featured",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "includeBody",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive keyword filter matching English and Traditional Chinese fields.",
            "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
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated briefings list"
          }
        }
      }
    },
    "/v1/briefings/{slug}": {
      "get": {
        "summary": "Get full bilingual briefing by slug (alias: /v1/news/{slug})",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full briefing with sections, takeaways, and references"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/v1/directory": {
      "get": {
        "summary": "Hong Kong AI research centres, compute infrastructure, startups, communities, and funds",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "research",
                "infrastructure",
                "startup",
                "community",
                "funding"
              ]
            }
          },
          {
            "name": "district",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Pok Fu Lam",
                "Sha Tin",
                "Clear Water Bay",
                "Hong Kong Island",
                "Kowloon",
                "Citywide"
              ]
            }
          },
          {
            "name": "featured",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "verified",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive keyword filter matching English and Traditional Chinese fields.",
            "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
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered Hong Kong AI directory entries"
          }
        }
      }
    },
    "/v1/tools": {
      "get": {
        "summary": "Curated AI tools evaluated for Cantonese and HK Traditional Chinese workflows",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "models",
                "cantonese",
                "coding",
                "agents",
                "productivity",
                "infra"
              ]
            }
          },
          {
            "name": "pricing",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "open-source",
                "free",
                "freemium",
                "paid"
              ]
            }
          },
          {
            "name": "cantonese",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "native",
                "strong",
                "basic"
              ]
            }
          },
          {
            "name": "featured",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive keyword filter matching English and Traditional Chinese fields.",
            "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
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered AI tools list"
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "summary": "Hong Kong AI meetups, workshops, and ecosystem events",
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "in-person",
                "hybrid",
                "online"
              ]
            }
          },
          {
            "name": "district",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Pok Fu Lam",
                "Sha Tin",
                "Clear Water Bay",
                "Hong Kong Island",
                "Kowloon",
                "Citywide"
              ]
            }
          },
          {
            "name": "upcoming",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive keyword filter matching English and Traditional Chinese fields.",
            "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
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered events list"
          }
        }
      }
    },
    "/v1/events.ics": {
      "get": {
        "summary": "Subscribe to Hong Kong AI events in iCalendar (RFC 5545) format",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk"
              ],
              "default": "en"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "in-person",
                "hybrid",
                "online"
              ]
            }
          },
          {
            "name": "district",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Pok Fu Lam",
                "Sha Tin",
                "Clear Water Bay",
                "Hong Kong Island",
                "Kowloon",
                "Citywide"
              ]
            }
          },
          {
            "name": "upcoming",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "text/calendar payload"
          }
        }
      }
    },
    "/v1/events/{id}.ics": {
      "get": {
        "summary": "Single Hong Kong AI event iCalendar file",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk"
              ],
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Single VEVENT text/calendar payload"
          },
          "404": {
            "description": "Event not found"
          }
        }
      }
    },
    "/v1/search": {
      "get": {
        "summary": "Cross-portal bilingual search across wire, briefings, directory, tools, and events",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Case-insensitive keyword filter matching English and Traditional Chinese fields.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "types",
            "in": "query",
            "description": "Comma-separated subset of wire,briefings,directory,tools,events",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Language projection: en, zh-hk, or both (default: both).",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unified search results"
          }
        }
      }
    },
    "/rss.xml": {
      "get": {
        "summary": "RSS 2.0 feed (aliases: /feed.xml, /rss/en.xml, /rss/zh-hk.xml)",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ecosystem",
                "policy",
                "research",
                "models",
                "funding"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "application/rss+xml document"
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "summary": "JSON Feed 1.1 combining HK AI briefings and daily wire dispatches",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "zh-hk",
                "both"
              ],
              "default": "both"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ecosystem",
                "policy",
                "research",
                "models",
                "funding"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "application/feed+json document"
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "summary": "Stateless remote MCP server discovery metadata",
        "responses": {
          "200": {
            "description": "Server capabilities and available tools/resources"
          }
        }
      },
      "post": {
        "summary": "Stateless Streamable HTTP MCP JSON-RPC 2.0 endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response"
          },
          "202": {
            "description": "JSON-RPC notification accepted"
          },
          "413": {
            "description": "Payload exceeds 64 KiB limit"
          }
        }
      }
    }
  }
}