{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mencoro-com/json-schema/mencoro-com-keyword-listing-resource-schema.json",
  "title": "KeywordListingResource",
  "description": "One keyword of a project, its variants and its metrics over the requested window",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mencoro-com-openapi.json#/components/schemas/KeywordListingResource",
  "required": [
    "keyword",
    "keywordNormalized",
    "variantCount",
    "variantIds",
    "engines",
    "countries",
    "queryClusterIds",
    "hasUnclusteredVariant",
    "statusSummary",
    "statuses",
    "checkFrequencies",
    "nPassesValues",
    "sentimentPositive",
    "sentimentNeutral",
    "sentimentNegative",
    "mentionTypeCounts"
  ],
  "properties": {
    "keyword": {
      "description": "The keyword as a human types it, picked from the variants for display.",
      "type": "string"
    },
    "keywordNormalized": {
      "description": "The grouping key: the keyword lower-cased and unaccented. Unique within the project, and the stable way to match a row across pages.",
      "type": "string"
    },
    "variantCount": {
      "description": "Tracked queries behind this row that the current filters selected.",
      "type": "integer"
    },
    "variantIds": {
      "description": "Ids of those tracked queries. Accepted by the single tracked-query operation.",
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "engines": {
      "description": "Distinct engines across the variants, not a single engine.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "chatgpt",
          "claude",
          "perplexity",
          "google_ai_overview",
          "google_ai_mode",
          "google_serp",
          "google_shopping"
        ]
      }
    },
    "countries": {
      "description": "Distinct ISO-3166 alpha-2 countries across the variants.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "queryClusterIds": {
      "description": "Distinct keyword clusters the variants belong to. Empty when none of them is clustered.",
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "hasUnclusteredVariant": {
      "description": "Whether at least one variant belongs to no cluster.",
      "type": "boolean"
    },
    "statusSummary": {
      "description": "\"mixed\" when the variants disagree; otherwise the one status they share.",
      "type": "string",
      "enum": [
        "active",
        "paused",
        "mixed"
      ]
    },
    "statuses": {
      "description": "Distinct statuses across the variants.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "active",
          "paused"
        ]
      }
    },
    "checkFrequencies": {
      "description": "Distinct check frequencies across the variants.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "daily",
          "weekly",
          "monthly"
        ]
      }
    },
    "nPassesValues": {
      "description": "Distinct pass counts across the variants. Each Claude pass consumes five checks; each other engine pass consumes one.",
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "lastCheckedAt": {
      "description": "The most recent completed check across the variants. Null when none has ever completed — not a check that found nothing.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "avgSerpPosition": {
      "description": "Average position in traditional search over the window. 1-based, LOWER is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "trendSerp": {
      "description": "Signed improvement in avgSerpPosition against the previous window. Positive is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "avgShoppingPosition": {
      "description": "Average position in shopping results over the window. 1-based, LOWER is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "trendShopping": {
      "description": "Signed improvement in avgShoppingPosition. Positive is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "avgMentionPosition": {
      "description": "Average position of the brand mention inside the AI answer. 1-based, LOWER is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "trendMention": {
      "description": "Signed improvement in avgMentionPosition. Positive is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "avgLinkPosition": {
      "description": "Average position of a cited link to the brand. 1-based, LOWER is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "trendLink": {
      "description": "Signed improvement in avgLinkPosition. Positive is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "mentionPositionStability": {
      "description": "Day-to-day spread of the mention position (a standard deviation): LOWER means steadier.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "trendStability": {
      "description": "Signed improvement in mentionPositionStability. Positive means steadier than the previous window.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "positivityIndex": {
      "description": "0-100 weighted sentiment score of the mentions; HIGHER is better. Null when there were no mentions to score.",
      "type": [
        "integer",
        "null"
      ]
    },
    "trendPositivity": {
      "description": "Signed improvement in positivityIndex. Positive is better.",
      "type": [
        "integer",
        "null"
      ]
    },
    "mentionRate": {
      "description": "0-100 share of AI captures in the window that mentioned the brand; HIGHER is better.",
      "type": [
        "integer",
        "null"
      ]
    },
    "trendMentionRate": {
      "description": "Signed improvement in mentionRate. Positive is better.",
      "type": [
        "integer",
        "null"
      ]
    },
    "serpRate": {
      "description": "0-100 share of traditional-search captures in the window that ranked the brand; HIGHER is better.",
      "type": [
        "integer",
        "null"
      ]
    },
    "trendSerpRate": {
      "description": "Signed improvement in serpRate. Positive is better.",
      "type": [
        "integer",
        "null"
      ]
    },
    "shareOfVoice": {
      "description": "0-100 share of the weighted AI mentions against every tracked brand; HIGHER is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "trendShareOfVoice": {
      "description": "Signed improvement in shareOfVoice. Positive is better.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "sentimentPositive": {
      "description": "Positive brand mentions counted in the window. Zero here really is zero.",
      "type": "integer"
    },
    "sentimentNeutral": {
      "description": "Neutral brand mentions counted in the window.",
      "type": "integer"
    },
    "sentimentNegative": {
      "description": "Negative brand mentions counted in the window.",
      "type": "integer"
    },
    "avgMentionCount": {
      "description": "Mentions per AI engine per day with a capture, over the window. Not a total: the window total is not part of this contract.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "mentionTypeCounts": {
      "description": "Mentions counted in the window by the role the mention plays in the answer. Totals, not averages.",
      "properties": {
        "recommendation": {
          "type": "integer"
        },
        "comparison": {
          "type": "integer"
        },
        "listing": {
          "type": "integer"
        },
        "reference": {
          "type": "integer"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}