{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentwebmap-com/json-schema/agentwebmap-com-section-catalogue-schema.json",
  "title": "SectionCatalogue",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentwebmap-com-sections-api-openapi.yml#/components/schemas/SectionCatalogue",
  "type": "object",
  "properties": {
    "total": {
      "type": "integer"
    },
    "page": {
      "type": "integer"
    },
    "per_page": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "sites": {
            "type": "integer"
          },
          "total_sites": {
            "type": "integer"
          },
          "first_seen": {
            "type": "string"
          },
          "emerged_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "change_7d": {
            "type": "integer"
          },
          "trend_evidence": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "publisher_groups": {
                    "type": "integer"
                  }
                },
                "required": [
                  "publisher_groups"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "key",
          "label",
          "sites",
          "total_sites",
          "first_seen",
          "emerged_at",
          "change_7d",
          "trend_evidence"
        ],
        "additionalProperties": false
      }
    },
    "trend_policy": {
      "type": "string"
    },
    "filters": {
      "type": "object",
      "properties": {
        "sections": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sectionMatch": {
          "enum": [
            "all",
            "any"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "action": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "sections",
        "sectionMatch"
      ],
      "additionalProperties": false
    },
    "coverage": {
      "type": "object",
      "properties": {
        "eligible_sites": {
          "type": "integer"
        },
        "indexed_sites": {
          "type": "integer"
        },
        "partial_sites": {
          "type": "integer"
        },
        "pending_files": {
          "type": "integer"
        },
        "baseline_ready": {
          "type": "boolean"
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "statistics_updated_at": {
          "type": "string"
        },
        "statistics_stale": {
          "type": "boolean"
        }
      },
      "required": [
        "eligible_sites",
        "indexed_sites",
        "partial_sites",
        "pending_files",
        "baseline_ready",
        "updated_at"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "total",
    "page",
    "per_page",
    "results",
    "trend_policy",
    "filters",
    "coverage"
  ],
  "additionalProperties": false
}