{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upriver-ai/json-schema/upriver-ai-audience-insights-response-v3-schema.json",
  "title": "AudienceInsightsResponseV3",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upriver-ai-audience-api-openapi.yml#/components/schemas/AudienceInsightsResponseV3",
  "properties": {
    "rollup_summary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rollup Summary",
      "description": "One-paragraph cross-persona summary (1-2 sentences)."
    },
    "personas": {
      "items": {
        "$ref": "#/$defs/PersonaV3"
      },
      "type": "array",
      "title": "Personas",
      "description": "Up to 8 distinct, evidence-supported audience personas. The response may contain fewer when the available evidence does not support more."
    },
    "meta": {
      "$ref": "#/$defs/ResponseMetaV3",
      "description": "Generation metadata."
    }
  },
  "type": "object",
  "required": [
    "personas"
  ],
  "$defs": {
    "PersonaCitationV3": {
      "properties": {
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Title"
        },
        "text": {
          "type": "string",
          "title": "Text",
          "description": "Relevant excerpt from the citation"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "URL of the source if available"
        },
        "subreddit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Subreddit",
          "description": "Subreddit if from Reddit"
        }
      },
      "type": "object",
      "required": [
        "title",
        "text"
      ],
      "title": "PersonaCitationV3"
    },
    "PersonaV3": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Short descriptive label for this audience segment."
        },
        "description": {
          "type": "string",
          "title": "Description",
          "description": "1-sentence summary of what was observed about this group."
        },
        "personality_traits": {
          "items": {
            "$ref": "#/$defs/PersonalityTraitV3"
          },
          "type": "array",
          "title": "Personality Traits",
          "description": "Deprecated. Previously contained personality taxonomy traits. Now always empty — use buying_mindset for behavioral insights.",
          "deprecated": true
        },
        "buying_mindset": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Buying Mindset",
          "description": "1-2 short observations about how this group makes buying decisions — what influences them, how they relate to brands."
        },
        "purchase_motivations": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Purchase Motivations",
          "description": "Why this group wants the product category — enduring desired outcomes, problems solved, and identity payoffs observed in real discussions. 2-5 items; fewer is preferable when evidence is sparse."
        },
        "purchase_triggers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Purchase Triggers",
          "description": "What pushes them toward purchase now — specific moments, comparisons, and need states observed in real discussions. 2-5 items; fewer is preferable when evidence is sparse."
        },
        "purchase_barriers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Purchase Barriers",
          "description": "What stops them from buying — specific fears, concerns, objections, and friction points observed in real discussions. 2-5 items; fewer is preferable when evidence is sparse."
        },
        "behaviors": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Behaviors",
          "description": "Deprecated. No longer populated — always returns an empty list. For behavioral insights use buying_mindset, purchase_triggers, and phrase_examples.",
          "deprecated": true
        },
        "phrase_examples": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Phrase Examples",
          "description": "Distinctive slang, idioms, jargon, emojis, hashtags — 1-5 words each. 2-7 items; fewer is preferable to generic filler."
        },
        "voice_and_tone": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Voice And Tone",
          "description": "Deprecated. No longer populated — always returns an empty list. Use phrase_examples for how this audience communicates.",
          "deprecated": true
        },
        "communities": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Communities",
          "description": "Online communities supported by the segment's cited discussions. Omitted when the evidence does not establish a concentrated audience habitat."
        },
        "citations": {
          "items": {
            "$ref": "#/$defs/PersonaCitationV3"
          },
          "type": "array",
          "title": "Citations",
          "description": "Supporting citations from real discussions that validate this segment's characteristics."
        }
      },
      "type": "object",
      "required": [
        "label",
        "description",
        "purchase_motivations",
        "purchase_triggers",
        "purchase_barriers",
        "phrase_examples"
      ],
      "title": "PersonaV3"
    },
    "PersonalityTraitV3": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Taxonomy key, e.g. 'analytical', 'security_oriented'."
        },
        "label": {
          "type": "string",
          "title": "Label",
          "description": "Human-readable label for the trait, e.g. 'Analytical', 'Stability-Seeking'."
        }
      },
      "type": "object",
      "required": [
        "id",
        "label"
      ],
      "title": "PersonalityTraitV3"
    },
    "ResponseMetaV3": {
      "properties": {
        "generated_at": {
          "type": "string",
          "title": "Generated At"
        }
      },
      "type": "object",
      "title": "ResponseMetaV3"
    }
  }
}