{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/looot/main/json-schema/looot-catalog-overview-topic-schema.json",
  "title": "CatalogOverviewTopic",
  "x-generated": "2026-10-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/looot-openapi.json#/components/schemas/CatalogOverviewTopic",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "revision",
    "builtAt",
    "topic",
    "matchCount",
    "truncated",
    "jobs"
  ],
  "properties": {
    "revision": {
      "type": "string"
    },
    "builtAt": {
      "type": "string",
      "format": "date-time"
    },
    "topic": {
      "type": "string",
      "description": "The topic as matched: lowercased, punctuation folded to spaces"
    },
    "filter": {
      "type": "object",
      "additionalProperties": false,
      "description": "Present only on a narrowed view (category or platform given); such a view has no totals",
      "properties": {
        "category": {
          "type": "string"
        },
        "platform": {
          "type": "string"
        }
      }
    },
    "matchCount": {
      "type": "integer",
      "description": "Jobs that match before the cap"
    },
    "truncated": {
      "type": "boolean",
      "description": "True when matchCount is over the 25 jobs answered"
    },
    "jobs": {
      "type": "array",
      "maxItems": 25,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "providerCount",
          "endpointCount",
          "runnableCount",
          "cheapestPerCall",
          "cheapestPerResult",
          "category",
          "platform"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "providerCount": {
            "type": "integer",
            "description": "Distinct providers with at least one listed endpoint at this level"
          },
          "endpointCount": {
            "type": "integer"
          },
          "runnableCount": {
            "type": "integer",
            "description": "Endpoints runnable without your own key (keyless, or a platform key exists)"
          },
          "cheapestPerCall": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lowest per-call price in dollars at this level (the price you pay); null when nothing is priced per call"
          },
          "cheapestPerResult": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lowest per-result price in dollars at this level (the price you pay); null when nothing is priced per result"
          },
          "category": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          }
        }
      }
    }
  }
}