{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/limzo-com/json-schema/limzo-com-global-stats-schema.json",
  "title": "GlobalStats",
  "description": "Network-wide totals across all listed public groups.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/limzo-com-openapi.yml#/components/schemas/GlobalStats",
  "type": "object",
  "required": [
    "ok",
    "stats"
  ],
  "properties": {
    "ok": {
      "type": "boolean",
      "const": true
    },
    "docs": {
      "type": "string",
      "format": "uri",
      "description": "Human-readable API documentation."
    },
    "openapi": {
      "type": "string",
      "format": "uri",
      "description": "Machine-readable OpenAPI document for the REST API."
    },
    "stats": {
      "type": "object",
      "properties": {
        "public_groups": {
          "type": "integer",
          "description": "Public groups in the directory."
        },
        "messages_7d": {
          "type": "integer"
        },
        "messages_all": {
          "type": "integer"
        },
        "messages_total": {
          "type": "integer",
          "description": "Messages analyzed across all groups, all time (durable — survives retention pruning)."
        },
        "members_total": {
          "type": "integer",
          "description": "Distinct members ever tracked across all groups."
        },
        "spam_removed_total": {
          "type": "integer",
          "description": "Spam messages removed by moderation across all groups, all time."
        },
        "active_users_7d": {
          "type": "integer"
        },
        "replies_7d": {
          "type": "integer"
        },
        "reactions_7d": {
          "type": "integer"
        },
        "karma_7d": {
          "type": "integer"
        }
      }
    },
    "top_groups": {
      "type": "array",
      "description": "Current top public groups by Limzo Score.",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "pro",
              "community"
            ]
          },
          "score": {
            "type": "number"
          },
          "messages_7d": {
            "type": "integer"
          },
          "active_users_7d": {
            "type": "integer"
          }
        }
      }
    }
  }
}