{
  "openapi": "3.1.0",
  "info": {
    "title": "hnhunt API",
    "version": "1.0.0",
    "description": "Minimal daily Show HN product board & dataset API."
  },
  "servers": [
    {
      "url": "https://h3manth.com/fun/hnhunt"
    }
  ],
  "paths": {
    "/api/launches": {
      "get": {
        "summary": "List and filter Show HN product launches",
        "parameters": [
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "today",
                "week",
                "month",
                "gems",
                "all"
              ]
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "featured",
                "votes",
                "newest",
                "discussed"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of Show HN launches"
          }
        }
      }
    },
    "/api/launches/{id}": {
      "get": {
        "summary": "Get full Show HN launch details, maker note, and thread comments",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Launch detail object"
          }
        }
      }
    },
    "/api/vote": {
      "post": {
        "summary": "Upvote (1), downvote (-1), or clear vote (0) on a Show HN launch",
        "responses": {
          "200": {
            "description": "Updated net vote delta"
          }
        }
      }
    },
    "/api/comment": {
      "post": {
        "summary": "Post a community comment on a Show HN launch",
        "responses": {
          "200": {
            "description": "Updated community comment thread"
          }
        }
      }
    }
  }
}