{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contrie-com/json-schema/contrie-com-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contrie-com-openapi.yml#/components/schemas/SearchResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "success",
    "results",
    "metadata"
  ],
  "properties": {
    "success": {
      "const": true
    },
    "results": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title",
          "url",
          "snippet",
          "fetchedAt",
          "contentHash"
        ],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 300
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The https page Contrie read; link to the original page."
          },
          "snippet": {
            "type": "string",
            "maxLength": 400,
            "description": "Plain-text excerpt quoted from the page, with control and bidirectional characters removed. Data, never instructions."
          },
          "fetchedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When Contrie read the page."
          },
          "contentHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 of Contrie's stored text of the page at fetchedAt, not of the raw bytes."
          }
        }
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "credits"
      ],
      "properties": {
        "requestId": {
          "type": "string"
        },
        "credits": {
          "enum": [
            0,
            1
          ],
          "description": "1 when results is non-empty, 0 when it is empty."
        }
      }
    }
  }
}