{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trendsmcp-ai/json-schema/trendsmcp-ai-get-top-trends-request-schema.json",
  "title": "GetTopTrendsRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trendsmcp-ai-openapi.json#/components/schemas/GetTopTrendsRequest",
  "properties": {
    "category": {
      "description": "Required when type is one of: Amazon Best Sellers by Category, Google Trends by Category, Top Websites, Substack by Category, TikTok Trending Hashtags by Category. Use the official category name (case-insensitive).",
      "type": "string"
    },
    "country": {
      "description": "ISO 3166-1 alpha-2 code (US, GB, JP); default US. Only for: Google Trends, Google Trends by Category, TikTok Trending Hashtags, TikTok Trending Hashtags by Category, X (Twitter) Trending, YouTube Trending.",
      "type": "string"
    },
    "limit": {
      "default": 25,
      "description": "Max rows to return. Free plan boards return the top 10 only.",
      "maximum": 200,
      "minimum": 1,
      "type": "integer"
    },
    "mode": {
      "const": "get_top_trends",
      "description": "Canonical name (matches the MCP tool). Alias: 'top_trends'.",
      "type": "string"
    },
    "offset": {
      "default": 0,
      "description": "Rows to skip for pagination. Pinned to 0 on the Free plan; pagination is a paid feature.",
      "minimum": 0,
      "type": "integer"
    },
    "sort": {
      "default": "rank",
      "description": "'rank': current leaders. 'rank_change': biggest climbers vs a prior snapshot (rows include prev_rank and rank_change).",
      "enum": [
        "rank",
        "rank_change"
      ],
      "type": "string"
    },
    "type": {
      "description": "One live feed. Required on both REST and MCP; omitting it returns a 400 missing_parameter error.",
      "enum": [
        "Amazon Best Sellers Top Rated",
        "Amazon Best Sellers by Category",
        "App Store Top Free",
        "App Store Top Paid",
        "GitHub",
        "Google News Top News",
        "Google Play",
        "Google Trends",
        "Google Trends by Category",
        "IMDb MOVIEmeter",
        "Open Library Trending Books",
        "Reddit Hot Posts",
        "Reddit World News",
        "Top Websites",
        "Spotify Top Podcasts",
        "Steam Most Played",
        "Substack",
        "Substack by Category",
        "TikTok Trending Hashtags",
        "TikTok Trending Hashtags by Category",
        "TikTok Trending Searches",
        "Wikipedia Trending",
        "X (Twitter) Trending",
        "YouTube Trending"
      ],
      "type": "string"
    },
    "window": {
      "default": "30d",
      "description": "Lookback used only when sort is 'rank_change'. Short windows only have baselines on daily feeds.",
      "enum": [
        "1d",
        "3d",
        "7d",
        "14d",
        "30d"
      ],
      "type": "string"
    }
  },
  "required": [
    "mode",
    "type"
  ],
  "type": "object"
}