{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contrie-com/json-schema/contrie-com-verify-response-schema.json",
  "title": "VerifyResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contrie-com-openapi.yml#/components/schemas/VerifyResponse",
  "type": "object",
  "required": [
    "success",
    "verdict",
    "coverage",
    "fields",
    "metadata"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "grounding": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1,
      "description": "Fraction of checkable values found in the page. Null when nothing was checkable — never 0, which would read as 'every value was invented'."
    },
    "verdict": {
      "type": "string",
      "enum": [
        "all-grounded",
        "ungrounded-values",
        "nothing-checkable"
      ]
    },
    "coverage": {
      "allOf": [
        {
          "$ref": "#/$defs/GroundingCoverage"
        }
      ],
      "description": "Also carries 'ungrounded': the checkable values not found in the page."
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FieldGrounding"
      },
      "description": "Per-value verdicts, ungrounded first, capped at 50."
    },
    "metadata": {
      "type": "object",
      "properties": {
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Final URL after redirects for url; for html, the caller's baseUrl, never fetched (null without one)."
        },
        "source": {
          "type": "string",
          "enum": [
            "fetched",
            "html",
            "text"
          ]
        },
        "latencyMs": {
          "type": "integer",
          "description": "Time in milliseconds to resolve the source, including any fetch, and check the values."
        },
        "credits": {
          "type": "integer",
          "enum": [
            0
          ],
          "description": "This endpoint does not charge customer credits."
        }
      }
    }
  },
  "$defs": {
    "FieldGrounding": {
      "type": "object",
      "required": [
        "path",
        "value",
        "grounded"
      ],
      "properties": {
        "path": {
          "type": "string",
          "description": "JSONPath-style location of the value inside data, e.g. $.stories[0].title. Keys that are not plain identifiers use bracket notation with JSON-escaped quotes, e.g. $[\"price (USD)\"]; array elements are always numeric, e.g. $.items[0]."
        },
        "value": {
          "type": "string",
          "description": "The extracted value, rendered as a string."
        },
        "grounded": {
          "type": "boolean",
          "description": "Whether this value's text was located in the page text by the presence check: strings case-insensitive, with whitespace runs collapsed and the page's bold, italic and inline-code markers read as formatting (a value's own * or ` must be on the page); links as the same URL; numbers by value (31.0 matches 31); an ISO date also as the page writes it in words, inside an ISO timestamp, or as a numeric date in the day/month order the page's own dates establish; GBP, EUR and INR as their symbol beside an amount (£53.74). It shows presence, not that the text belongs to this field or entity. False means unconfirmed by this check, not disproved: a value the page presents differently can be missed."
        },
        "excerpt": {
          "type": "string",
          "description": "Page text surrounding the match, roughly 45 characters either side, with case preserved and whitespace runs collapsed. Absent when grounded is false."
        }
      }
    },
    "GroundingCoverage": {
      "type": "object",
      "required": [
        "total",
        "checkable",
        "grounded"
      ],
      "description": "How much of the data a grounding ratio speaks for.",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Values that assert something; nulls are not counted. Acceptance requires grounded to be at least half of this."
        },
        "checkable": {
          "type": "integer",
          "description": "How many of those carried enough text to search for. Booleans and strings under three characters do not; numbers are checked at any length. They still count in total, as values that were not found."
        },
        "grounded": {
          "type": "integer",
          "description": "How many of the checkable values were found in the page."
        }
      }
    }
  }
}