{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/auditae-app/json-schema/auditae-app-crawl-check-detail-schema.json",
  "title": "CrawlCheckDetail",
  "description": "One check on a run and the items failing it, paginated. The same body as the MCP tool get_crawl_issue.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/auditae-app-openapi.json#/components/schemas/CrawlCheckDetail",
  "type": "object",
  "required": [
    "site_id",
    "run_id",
    "check",
    "status",
    "n",
    "of",
    "items",
    "total",
    "next_offset"
  ],
  "properties": {
    "site_id": {
      "type": "string",
      "format": "uuid"
    },
    "run_id": {
      "type": "string",
      "format": "uuid"
    },
    "check": {
      "$ref": "#/$defs/CrawlCheck"
    },
    "status": {
      "type": "string",
      "enum": [
        "fail",
        "pass",
        "not_run",
        "pending"
      ],
      "description": "pending: the run is still crawling."
    },
    "n": {
      "type": [
        "integer",
        "null"
      ]
    },
    "of": {
      "type": [
        "integer",
        "null"
      ]
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CrawlCheckItem"
      }
    },
    "total": {
      "type": "integer",
      "description": "Items in all, before pagination."
    },
    "next_offset": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Pass as offset for the next items; null on the last."
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "First page only, for duplicate, redirect-chain, broken-link and hreflang checks: the groups behind the items."
    },
    "compare": {
      "type": "string",
      "enum": [
        "new",
        "fixed"
      ],
      "description": "With ?compare: the items are the pages newly failing the check, or fixed, since base_run_id."
    },
    "base_run_id": {
      "type": "string",
      "format": "uuid",
      "description": "With ?compare: the run compared with."
    },
    "vs_previous": {
      "type": "object",
      "properties": {
        "from": {
          "type": "integer",
          "description": "Items failing on the base run."
        },
        "to": {
          "type": "integer",
          "description": "Items failing now."
        },
        "new": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Page checks: pages newly failing. Link, image and script checks: the rise in failing items (max(0, to − from)), so items can list more when others were fixed."
        },
        "fixed": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Page checks: pages failing then and not now (fixed, or the page now errors or redirects and isn't checked). Link, image and script checks: the fall in failing items."
        }
      },
      "description": "With ?compare: the check's change since base_run_id."
    },
    "note": {
      "type": "string"
    }
  },
  "$defs": {
    "CrawlCheck": {
      "type": "object",
      "description": "One of the 174 Site Audit checks. In a crawl's checks list only id, severity, title, n and of are sent.",
      "required": [
        "id",
        "severity",
        "title"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable check id (never renamed)."
        },
        "title": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "error",
            "warning",
            "notice"
          ]
        },
        "themes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "crawlability",
              "https",
              "international",
              "core_web_vitals",
              "performance",
              "internal_linking",
              "markup",
              "ai_search",
              "on_page"
            ]
          },
          "description": "First = primary theme."
        },
        "scope": {
          "type": "string",
          "enum": [
            "page",
            "cross",
            "site",
            "resource",
            "cwv"
          ],
          "description": "page: per page · cross: across pages · site: once per run · resource: links, images, scripts · cwv: Core Web Vitals pass."
        },
        "rule": {
          "type": "string",
          "description": "The exact rule, with thresholds."
        },
        "why": {
          "type": "string"
        },
        "fix": {
          "type": "string"
        },
        "fix_tools": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "MCP tools that act on it."
        },
        "semrush_ids": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The Semrush Site Audit issue ids it maps to."
        },
        "status": {
          "type": "string",
          "enum": [
            "fail",
            "pass",
            "not_run"
          ]
        },
        "n": {
          "type": "integer",
          "description": "Items failing (0 when it passed)."
        },
        "of": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Items checked (pages, links, images …); null while provisional."
        },
        "samples": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "maxItems": 5,
          "description": "Up to 5 examples, \"url\" or \"url → detail\"."
        },
        "reason": {
          "type": "string",
          "enum": [
            "verified_bots",
            "capped",
            "no_sitemap",
            "sitemap_truncated",
            "sitemap_unreadable",
            "scoped",
            "no_probe",
            "probe_failed",
            "no_resources",
            "unknown_sizes",
            "cwv_pending",
            "excluded",
            "image_format_unverified"
          ],
          "description": "not_run only: why it wasn't judged."
        }
      }
    },
    "CrawlCheckItem": {
      "type": "object",
      "required": [
        "url",
        "evidence"
      ],
      "properties": {
        "url": {
          "type": "string"
        },
        "evidence": {
          "type": "object",
          "additionalProperties": true,
          "description": "The few fields that show why this item fails (status, title, length, referrers …)."
        }
      }
    }
  }
}