{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asoskill-com/json-schema/asoskill-com-popularity-response-schema.json",
  "title": "PopularityResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asoskill-com-openapi.yaml#/components/schemas/PopularityResponse",
  "type": "object",
  "required": [
    "term",
    "storefront",
    "score",
    "source",
    "resolution",
    "scoreVersion",
    "cache",
    "fetchedAt",
    "requestId"
  ],
  "properties": {
    "term": {
      "type": "string"
    },
    "storefront": {
      "type": "string"
    },
    "score": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "source": {
      "type": "string",
      "enum": [
        "monthly",
        "direct",
        "related",
        "autocomplete",
        "fallback"
      ],
      "description": "Autocomplete means a conservative low-volume estimate based on the exact term appearing before the full query; raw prefixes and censored Apple values are not exposed."
    },
    "resolution": {
      "type": "string",
      "enum": [
        "final",
        "pending"
      ],
      "description": "Pending means background autocomplete evidence is still being collected and the score may improve on a later request. Cache only final results with the normal freshness policy."
    },
    "scoreVersion": {
      "type": "integer",
      "minimum": 1,
      "description": "Version of the popularity resolution model used for this response."
    },
    "retryAfterSeconds": {
      "type": "integer",
      "minimum": 1,
      "description": "Suggested delay before checking a pending result again."
    },
    "cache": {
      "$ref": "#/$defs/CacheStatus"
    },
    "fetchedAt": {
      "type": "string",
      "format": "date-time"
    },
    "requestId": {
      "type": "string"
    }
  },
  "$defs": {
    "CacheStatus": {
      "type": "string",
      "enum": [
        "hit",
        "refresh",
        "stale"
      ]
    }
  }
}