{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buzzradr-com/json-schema/buzzradr-com-public-topic-schema.json",
  "title": "PublicTopic",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/buzzradr-com-api-openapi.yml#/components/schemas/PublicTopic",
  "type": "object",
  "required": [
    "topicId",
    "vertical",
    "title",
    "keywords",
    "platforms",
    "score",
    "firstSeenAt",
    "lastSeenAt",
    "itemCount",
    "trustedSourceCount",
    "relatedItemCount",
    "topItems"
  ],
  "properties": {
    "topicId": {
      "type": "string"
    },
    "vertical": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "summarySource": {
      "type": "string"
    },
    "aiWhy": {
      "type": "string",
      "description": "Locale-selected \"why this matters\" judgement produced by the AI enrichment pass. Absent when none was generated; there is no placeholder or fallback value."
    },
    "sourceClass": {
      "type": "string",
      "enum": [
        "official",
        "media",
        "dev_community",
        "research",
        "commentary",
        "other"
      ]
    },
    "reason": {
      "type": "string",
      "description": "Signal-grounded one-liner on why the topic is trending."
    },
    "reasonSource": {
      "type": "string"
    },
    "reasonConfidence": {
      "type": "string"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "score": {
      "type": "number",
      "description": "Composite ranking score combining source, coverage, engagement and freshness signals; not 24-hour discussion heat."
    },
    "firstSeenAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastSeenAt": {
      "type": "string",
      "format": "date-time"
    },
    "itemCount": {
      "type": "integer"
    },
    "trustedSourceCount": {
      "type": "integer",
      "description": "Compatibility field; under verified-public v2 this equals independentSourceCount."
    },
    "independentSourceCount": {
      "type": "integer",
      "description": "Distinct public content publishers supporting this topic."
    },
    "signalPublisherCount": {
      "type": "integer",
      "description": "Folded count of heat-signal publishers; identities are not exposed."
    },
    "verificationEvidence": {
      "type": "object",
      "required": [
        "anchorType",
        "anchorCount"
      ],
      "properties": {
        "anchorType": {
          "type": "string",
          "enum": [
            "authoritative",
            "independent_corroboration"
          ]
        },
        "anchorCount": {
          "type": "integer"
        },
        "firstVerifiedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "relatedItemCount": {
      "type": "integer"
    },
    "topItems": {
      "type": "array",
      "maxItems": 3,
      "items": {
        "$ref": "#/$defs/PublicItem"
      }
    }
  },
  "$defs": {
    "PublicItem": {
      "type": "object",
      "required": [
        "itemId",
        "title",
        "platform",
        "sourceType",
        "firstSeenAt",
        "lastSeenAt"
      ],
      "properties": {
        "itemId": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "authorAvatar": {
          "type": "string"
        },
        "excerpt": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "contentSource": {
          "type": "string"
        },
        "translation": {
          "type": "string"
        },
        "imageUrl": {
          "type": "string"
        },
        "imageUrls": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "platform": {
          "type": "string"
        },
        "sourceType": {
          "type": "string"
        },
        "sourceClass": {
          "type": "string",
          "enum": [
            "official",
            "media",
            "dev_community",
            "research",
            "commentary",
            "other"
          ],
          "description": "Classification of this item's source, independent of its collection method or verification status. May be absent in historical snapshots."
        },
        "engagement": {
          "type": "object",
          "description": "Raw engagement metrics; keys vary by platform.",
          "additionalProperties": true
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time"
        },
        "firstSeenAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastSeenAt": {
          "type": "string",
          "format": "date-time"
        },
        "sourceId": {
          "type": "string",
          "description": "Absent for archived snapshots, which never persisted it."
        }
      }
    }
  }
}