{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scanmalware-com/json-schema/scanmalware-com-smqlcounts-request-schema.json",
  "title": "SMQLCountsRequest",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scanmalware-com-openapi.json#/components/schemas/SMQLCountsRequest",
  "properties": {
    "queries": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "maxItems": 25,
      "minItems": 1,
      "title": "Queries",
      "description": "Up to 25 SMQL queries"
    },
    "sites": {
      "type": "boolean",
      "title": "Sites",
      "description": "Also summarise the sites behind each query with 10 or more matches: `sites` (distinct registrable domains among up to 200 matching scans), `elevated_sites` (those rated high risk or worse) and `shared_widely` (many sites, and no more of them rated high risk than across all scanned sites: a value common to unrelated sites, such as a widely used script). A value that a hunt searches for is never `shared_widely`, and carries `hunt: true`. The summary also carries `hosts`: distinct submitted hosts (without www.) among the same sample.",
      "default": false
    },
    "sites_min": {
      "type": "integer",
      "maximum": 10.0,
      "minimum": 2.0,
      "title": "Sites Min",
      "description": "With `sites`, summarise queries with at least this many matches (2-10, default 10). `shared_widely` still needs 10 or more sites.",
      "default": 10
    },
    "exclude_site": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 253,
          "pattern": "^[A-Za-z0-9._\\-:\\[\\]]+$"
        },
        {
          "type": "null"
        }
      ],
      "title": "Exclude Site",
      "description": "With `sites`, also describe the sites other than this one (a host; with or without www., any case; a scan of it counts as its own when its submitted or final host is this host): `others` with `sites`, `verdicts` (sites by the worst AI verdict among their sampled scans: CONFIRMED_SCAM, HIGH_RISK, MODERATE_RISK, LOW_RISK, LEGITIMATE, NONE), `names` (up to 5, worst rated first), `complete` (the sample of up to 200 scans held every match) and, when complete, `set` (a short key of the exact set of other sites: two values with the same `set` lead to the same sites)."
    },
    "patient": {
      "type": "boolean",
      "title": "Patient",
      "description": "Count again with a longer time budget (15 s instead of 5 s), for queries whose count came back `count_unavailable`; at most 4 queries. A count that ran out of time before is counted again, not answered from the cache.",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "queries"
  ]
}