{
  "openapi": "3.0.3",
  "info": {
    "title": "Polish Lottery Results API (Lotto-Wyniki)",
    "description": "Real-time Polish lottery draw results API for Lotto 6/49, Mini Lotto 5/42, Multi Multi 20/80, Kaskada 12/24, and Eurojackpot 5+2.",
    "version": "1.0.0",
    "contact": {
      "name": "Lotto-Wyniki.com",
      "url": "https://lotto-wyniki.com",
      "email": "contact@lotto-wyniki.com"
    }
  },
  "servers": [
    {
      "url": "https://lotto-wyniki.com",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/lottery-results.json": {
      "get": {
        "summary": "Get all latest lottery results and draw history",
        "description": "Returns the most recent winning numbers, draw dates, draw identifiers, and historical draw records for all 5 Polish lottery games.",
        "operationId": "getLotteryResults",
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lastUpdated": { "type": "string", "example": "22.09.2026, 12:31:39" },
                    "lotto": { "$ref": "#/components/schemas/DrawResult" },
                    "miniLotto": { "$ref": "#/components/schemas/DrawResult" },
                    "multiMulti": { "$ref": "#/components/schemas/DrawResult" },
                    "kaskada": { "$ref": "#/components/schemas/DrawResult" },
                    "eurojackpot": { "$ref": "#/components/schemas/EurojackpotResult" },
                    "history": {
                      "type": "object",
                      "properties": {
                        "lotto": { "type": "array", "items": { "$ref": "#/components/schemas/DrawResult" } },
                        "miniLotto": { "type": "array", "items": { "$ref": "#/components/schemas/DrawResult" } },
                        "multiMulti": { "type": "array", "items": { "$ref": "#/components/schemas/DrawResult" } },
                        "kaskada": { "type": "array", "items": { "$ref": "#/components/schemas/DrawResult" } },
                        "eurojackpot": { "type": "array", "items": { "$ref": "#/components/schemas/EurojackpotResult" } }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DrawResult": {
        "type": "object",
        "properties": {
          "date": { "type": "string", "example": "19.09.2026" },
          "numbers": { "type": "array", "items": { "type": "string" }, "example": ["03", "06", "09", "22", "40", "48"] },
          "drawNum": { "type": "string", "example": "7407" },
          "url": { "type": "string", "example": "https://www.wynikilotto.net.pl/lotto/wyniki/19-wrz-2026/" }
        }
      },
      "EurojackpotResult": {
        "type": "object",
        "properties": {
          "date": { "type": "string", "example": "18.09.2026" },
          "numbers": { "type": "array", "items": { "type": "string" }, "example": ["04", "25", "30", "32", "33"] },
          "stars": { "type": "array", "items": { "type": "string" }, "example": ["04", "05"] },
          "drawNum": { "type": "string", "example": "730" }
        }
      }
    }
  }
}
