{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upriver-ai/json-schema/upriver-ai-radar-facets-response-schema.json",
  "title": "RadarFacetsResponse",
  "description": "Legal filter vocabularies — filters are exact-match, so callers\nneed a way to learn valid values instead of guessing.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upriver-ai-trends-radar-beta-api-openapi.yml#/components/schemas/RadarFacetsResponse",
  "properties": {
    "beta": {
      "type": "string",
      "title": "Beta",
      "description": "Beta status caveat.",
      "default": "Beta: response shapes may change and this surface may converge with /v2/trends."
    },
    "types": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Types",
      "description": "Item types for the type filter."
    },
    "programs": {
      "items": {
        "$ref": "#/$defs/FacetValue"
      },
      "type": "array",
      "title": "Programs",
      "description": "Available market catalogs."
    },
    "lifecycle_states": {
      "items": {
        "$ref": "#/$defs/FacetValue"
      },
      "type": "array",
      "title": "Lifecycle States",
      "description": "Lifecycle values."
    },
    "personas": {
      "items": {
        "$ref": "#/$defs/FacetValue"
      },
      "type": "array",
      "title": "Personas",
      "description": "Audience persona keys."
    },
    "brand_safety": {
      "items": {
        "$ref": "#/$defs/FacetValue"
      },
      "type": "array",
      "title": "Brand Safety",
      "description": "Brand-safety values."
    },
    "sorts": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Sorts",
      "description": "Valid sort values for list calls."
    }
  },
  "type": "object",
  "required": [
    "types",
    "programs",
    "lifecycle_states",
    "personas",
    "brand_safety",
    "sorts"
  ],
  "$defs": {
    "FacetValue": {
      "properties": {
        "value": {
          "type": "string",
          "title": "Value",
          "description": "The filter value to pass in queries."
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label",
          "description": "Display label."
        },
        "count": {
          "type": "integer",
          "title": "Count",
          "description": "Items currently carrying this value."
        }
      },
      "type": "object",
      "required": [
        "value",
        "count"
      ],
      "title": "FacetValue"
    }
  }
}