{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-crypto-search-response-schema.json",
  "title": "CryptoSearchResponse",
  "description": "Search response for crypto assets.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adanos-market-sentiment-api-reddit-crypto-api-openapi.yml#/components/schemas/CryptoSearchResponse",
  "properties": {
    "query": {
      "type": "string",
      "title": "Query",
      "description": "Original search query"
    },
    "count": {
      "type": "integer",
      "title": "Count",
      "description": "Total number of matching assets before the limit is applied"
    },
    "period_days": {
      "type": "integer",
      "minimum": 1.0,
      "title": "Period Days",
      "description": "Fixed lookback window used for each summary block"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/CryptoSearchItem"
      },
      "type": "array",
      "title": "Results",
      "description": "Top matching crypto assets capped by the requested limit"
    }
  },
  "type": "object",
  "required": [
    "query",
    "count",
    "period_days",
    "results"
  ],
  "$defs": {
    "CryptoSearchItem": {
      "properties": {
        "symbol": {
          "type": "string",
          "title": "Symbol"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "market_cap_rank": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Market Cap Rank"
        },
        "market_cap_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Market Cap Usd"
        },
        "aliases": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Aliases"
        },
        "summary": {
          "$ref": "#/$defs/CryptoSearchSummary",
          "description": "Last-7-days Reddit summary for this asset"
        }
      },
      "type": "object",
      "required": [
        "symbol",
        "name",
        "summary"
      ],
      "title": "CryptoSearchItem",
      "description": "Single search result for crypto reference data."
    },
    "CryptoSearchSummary": {
      "properties": {
        "mentions": {
          "type": "integer",
          "minimum": 0.0,
          "title": "Mentions",
          "description": "Attributed mentions in the last 7 UTC calendar days, including inherited thread-context mentions"
        },
        "buzz_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 100.0,
              "minimum": 0.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Buzz Score",
          "description": "Buzz score over the last 7 UTC calendar days"
        },
        "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, upvotes and subreddit breadth; not price movement. For `from`/`to`, anchors at `to` (or now when `to` is today)."
        },
        "sentiment_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Sentiment Score",
          "description": "Average sentiment score over the last 7 UTC calendar days"
        }
      },
      "type": "object",
      "required": [
        "mentions",
        "buzz_score"
      ],
      "title": "CryptoSearchSummary",
      "description": "Compact last-7-days summary attached to crypto search results."
    }
  }
}