{
  "openapi": "3.1.0",
  "info": {
    "title": "TG4 4DDraw.com public data API",
    "description": "Read-only static dataset of Malaysian 4D lottery results, published as CC0 public-domain JSON, CSV, and Atom/RSS/JSON Feed snapshots. Regenerated each build (~hourly during draws).",
    "version": "mp974618",
    "license": {
      "name": "CC0-1.0",
      "identifier": "CC0-1.0"
    },
    "contact": {
      "name": "4DDraw.com",
      "url": "https://4ddraw.com/"
    }
  },
  "servers": [
    {
      "url": "https://4ddraw.com"
    }
  ],
  "paths": {
    "/api/index.json": {
      "get": {
        "summary": "API root (hypermedia index of all endpoints)",
        "responses": {
          "200": {
            "description": "tg4.api-index.v1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/today.json": {
      "get": {
        "summary": "Today's 4D results for all operators",
        "responses": {
          "200": {
            "description": "tg4.today.v1",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "https://4ddraw.com/api/today.schema.json"
                }
              }
            }
          }
        }
      }
    },
    "/api/today.csv": {
      "get": {
        "summary": "Today's 4D results as CSV",
        "responses": {
          "200": {
            "description": "CSV",
            "content": {
              "text/csv": {}
            }
          }
        }
      }
    },
    "/api/today.md": {
      "get": {
        "summary": "Today's 4D results as Markdown",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {}
            }
          }
        }
      }
    },
    "/api/today.yaml": {
      "get": {
        "summary": "Today's 4D results as YAML",
        "responses": {
          "200": {
            "description": "YAML",
            "content": {
              "application/x-yaml": {}
            }
          }
        }
      }
    },
    "/api/today.xml": {
      "get": {
        "summary": "Today's 4D results as XML",
        "responses": {
          "200": {
            "description": "XML",
            "content": {
              "application/xml": {}
            }
          }
        }
      }
    },
    "/api/today.txt": {
      "get": {
        "summary": "Plain-text mirror",
        "responses": {
          "200": {
            "description": "text/plain",
            "content": {
              "text/plain": {}
            }
          }
        }
      }
    },
    "/api/today-hash.txt": {
      "get": {
        "summary": "Content hashes (sha256/sha1/md5) of today.json",
        "responses": {
          "200": {
            "description": "text/plain",
            "content": {
              "text/plain": {}
            }
          }
        }
      }
    },
    "/api/today-headline.txt": {
      "get": {
        "summary": "Share-ready 280-char headline",
        "responses": {
          "200": {
            "description": "text/plain",
            "content": {
              "text/plain": {}
            }
          }
        }
      }
    },
    "/api/today.schema.json": {
      "get": {
        "summary": "JSON Schema for /api/today.json",
        "responses": {
          "200": {
            "description": "Draft 2020-12 schema",
            "content": {
              "application/schema+json": {}
            }
          }
        }
      }
    },
    "/api/operators.json": {
      "get": {
        "summary": "Static operator catalog (11 entries)",
        "responses": {
          "200": {
            "description": "tg4.operators.v1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/upcoming.json": {
      "get": {
        "summary": "Next draw timing",
        "responses": {
          "200": {
            "description": "tg4.upcoming.v1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/holidays.json": {
      "get": {
        "summary": "MY 2026 public holidays + affects_draw flag",
        "responses": {
          "200": {
            "description": "tg4.holidays.v1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/changelog.json": {
      "get": {
        "summary": "14-day rolling build history",
        "responses": {
          "200": {
            "description": "tg4.changelog.v1",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/draws.ics": {
      "get": {
        "summary": "iCalendar of upcoming major draws",
        "responses": {
          "200": {
            "description": "text/calendar",
            "content": {
              "text/calendar": {}
            }
          }
        }
      }
    },
    "/feed.json": {
      "get": {
        "summary": "JSON Feed 1.1",
        "responses": {
          "200": {
            "description": "jsonfeed.org/version/1.1",
            "content": {
              "application/feed+json": {}
            }
          }
        }
      }
    },
    "/atom.xml": {
      "get": {
        "summary": "Atom 1.0",
        "responses": {
          "200": {
            "description": "RFC 4287",
            "content": {
              "application/atom+xml": {}
            }
          }
        }
      }
    },
    "/rss.xml": {
      "get": {
        "summary": "RSS 2.0",
        "responses": {
          "200": {
            "description": "RSS 2.0",
            "content": {
              "application/rss+xml": {}
            }
          }
        }
      }
    }
  }
}