{
  "openapi": "3.1.0",
  "info": {
    "title": "Wonderlaunch Public API",
    "version": "1.0.0",
    "description": "Public, read-only data feeds for AI discovery and integration. Transactional and user-authenticated routes are omitted.",
    "contact": {
      "email": "support@wonderlaunch.app"
    }
  },
  "servers": [
    {
      "url": "https://wonderlaunch.app",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/api/ai": {
      "get": {
        "summary": "AI Discovery Snapshot",
        "description": "Returns a bounded JSON snapshot of the platform, including total live product stats, the all-time top 10 leaderboard, and the 10 most recently launched products. Optimized for LLM context windows.",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "_meta": {
                      "type": "object"
                    },
                    "stats": {
                      "type": "object"
                    },
                    "leaderboard": {
                      "type": "array"
                    },
                    "recent_launches": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ai/search": {
      "get": {
        "summary": "Natural Language Product Search",
        "description": "Searches the Wonderlaunch product catalog using natural language. This endpoint is rate-limited.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The search query (e.g., 'CRM for freelancers')"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results"
          }
        }
      }
    },
    "/api/products": {
      "get": {
        "summary": "Live Product Catalog",
        "description": "Fetches a paginated list of live products on Wonderlaunch.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of products"
          }
        }
      }
    },
    "/api/directories": {
      "get": {
        "summary": "Curated Directories",
        "description": "Fetches the catalog of curated startup directories.",
        "responses": {
          "200": {
            "description": "List of directories"
          }
        }
      }
    },
    "/api/changelog": {
      "get": {
        "summary": "Platform Changelog",
        "description": "Fetches the latest platform updates and feature releases for Wonderlaunch.",
        "responses": {
          "200": {
            "description": "Changelog entries"
          }
        }
      }
    }
  }
}
