{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-news-stock-sentiment-schema.json",
  "title": "NewsStockSentiment",
  "description": "Detailed sentiment analysis for a specific stock ticker from news mentions.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adanos-market-sentiment-api-news-stocks-api-openapi.yml#/components/schemas/NewsStockSentiment",
  "properties": {
    "ticker": {
      "type": "string",
      "title": "Ticker",
      "description": "Stock ticker symbol"
    },
    "company_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Company Name",
      "description": "Company name from ticker_reference (null if not found)"
    },
    "found": {
      "type": "boolean",
      "title": "Found",
      "description": "Legacy v1 data-availability flag. `true` means this service has qualifying data for this asset/window. `false` means the asset is supported, but this service has no qualifying data for the requested window. Planned for removal in v2.",
      "deprecated": true
    },
    "buzz_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Buzz Score",
      "description": "Buzz Score (0-100). Asymptotic scaling above 50."
    },
    "mentions": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Mentions",
      "description": "Total mentions in the selected period"
    },
    "sentiment_score": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Sentiment Score",
      "description": "Average sentiment score (-1 bearish to +1 bullish)"
    },
    "positive_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Positive Count",
      "description": "Deprecated. Prefer bullish_pct with mentions for public analysis; retained for v1 compatibility.",
      "deprecated": true
    },
    "negative_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Negative Count",
      "description": "Deprecated. Prefer bearish_pct with mentions for public analysis; retained for v1 compatibility.",
      "deprecated": true
    },
    "neutral_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Neutral Count",
      "description": "Deprecated. Prefer bullish_pct, bearish_pct and mentions for public analysis; retained for v1 compatibility.",
      "deprecated": true
    },
    "source_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Count",
      "description": "Number of sources with mentions"
    },
    "trend": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "rising",
            "falling",
            "stable"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Trend",
      "description": "Activity momentum over the current 3 UTC days vs previous 3 UTC days using mentions/articles and source breadth; not price movement. For `from`/`to`, anchors at `to` (or now when `to` is today)."
    },
    "bullish_pct": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Bullish Pct",
      "description": "Percentage of bullish mentions"
    },
    "bearish_pct": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Bearish Pct",
      "description": "Percentage of bearish mentions"
    },
    "period_days": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Period Days",
      "description": "Analysis period in days"
    },
    "top_sources": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NewsSourceCount"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Top Sources",
      "description": "Top sources by mention count"
    },
    "daily_trend": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/DailyTrendItem"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Daily Trend",
      "description": "Daily mention breakdown for the selected period, with sentiment and buzz_score"
    },
    "top_mentions": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/NewsTopMention"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Top Mentions",
      "description": "Top news mentions from the selected period, ranked by recency"
    }
  },
  "type": "object",
  "required": [
    "ticker",
    "found"
  ],
  "$defs": {
    "DailyTrendItem": {
      "properties": {
        "date": {
          "type": "string",
          "format": "date",
          "title": "Date",
          "description": "Date in YYYY-MM-DD format"
        },
        "mentions": {
          "type": "integer",
          "title": "Mentions",
          "description": "Attributed mention count for this date, including inherited thread-context mentions"
        },
        "sentiment_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment Score",
          "description": "Average sentiment score for this date"
        },
        "buzz_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Buzz Score",
          "description": "Buzz score for this date (0-100)"
        },
        "bullish_pct": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Bullish Pct",
          "description": "Bullish mention percentage for this date, calculated from positive sentiment-classified mentions"
        },
        "bearish_pct": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Bearish Pct",
          "description": "Bearish mention percentage for this date, calculated from negative sentiment-classified mentions"
        }
      },
      "type": "object",
      "required": [
        "date",
        "mentions"
      ],
      "title": "DailyTrendItem",
      "description": "Daily trend data point."
    },
    "NewsSourceCount": {
      "properties": {
        "source": {
          "type": "string",
          "title": "Source",
          "description": "News source identifier"
        },
        "mentions": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Mentions",
          "description": "Mentions from this source"
        },
        "sentiment_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment Score",
          "description": "Average sentiment score for this source in the selected period"
        },
        "buzz_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Buzz Score",
          "description": "Contributor-level buzz score for this source in the selected period"
        },
        "count": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Count",
          "description": "Deprecated alias for mentions. Use mentions instead.",
          "deprecated": true
        }
      },
      "type": "object",
      "required": [
        "source",
        "mentions",
        "count"
      ],
      "title": "NewsSourceCount",
      "description": "News source contributor metrics for a stock detail response."
    },
    "NewsTopMention": {
      "properties": {
        "text_snippet": {
          "type": "string",
          "title": "Text Snippet",
          "description": "Excerpt from the mention"
        },
        "sentiment_score": {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0,
          "title": "Sentiment Score",
          "description": "Sentiment score (-1 to +1)"
        },
        "sentiment_label": {
          "type": "string",
          "title": "Sentiment Label",
          "description": "Sentiment label (positive/negative/neutral)"
        },
        "source": {
          "type": "string",
          "title": "Source",
          "description": "Source publication identifier"
        },
        "created_utc": {
          "type": "string",
          "title": "Created Utc",
          "description": "ISO timestamp of creation"
        }
      },
      "type": "object",
      "required": [
        "text_snippet",
        "sentiment_score",
        "sentiment_label",
        "source",
        "created_utc"
      ],
      "title": "NewsTopMention",
      "description": "Top mention item from news."
    }
  }
}