{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/painspotter-ai/json-schema/painspotter-ai-opportunity-detail-schema.json",
  "title": "OpportunityDetail",
  "description": "List item fields plus long-form detail-only fields.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/painspotter-ai-openapi.json#/components/schemas/OpportunityDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "platform": {
      "type": "string",
      "description": "Source platform: reddit | hackernews | producthunt | stackexchange | …"
    },
    "channel_name": {
      "type": "string"
    },
    "title": {
      "type": "string",
      "description": "LLM-rewritten title (not the original post headline)."
    },
    "slug": {
      "type": "string"
    },
    "recommendation": {
      "type": "string",
      "enum": [
        "Build",
        "Validate",
        "Skip"
      ]
    },
    "score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "0–100 composite opportunity score."
    },
    "pain_point_intensity": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10
    },
    "willingness_to_pay_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10
    },
    "tech_difficulty": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10
    },
    "sustainability_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10
    },
    "target_audience": {
      "type": "string"
    },
    "monetization_model": {
      "type": "string"
    },
    "evidence_count": {
      "type": "integer"
    },
    "merged_from_count": {
      "type": "integer"
    },
    "is_online_deliverable": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "description": {
      "type": "string",
      "description": "Long-form pain narrative."
    },
    "market_size_estimate": {
      "type": "string"
    },
    "key_features": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "competitors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "differentiation": {
      "type": "string"
    },
    "risks": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "related_article_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL of the published blog analysis for this opportunity, if one exists."
    }
  }
}