{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/difficat-com/json-schema/difficat-com-snapshot-page-schema.json",
  "title": "SnapshotPage",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/difficat-com-openapi.yml#/components/schemas/SnapshotPage",
  "type": "object",
  "required": [
    "path",
    "finalUrl",
    "status",
    "content",
    "screenshot"
  ],
  "properties": {
    "path": {
      "type": "string"
    },
    "finalUrl": {
      "type": "string",
      "description": "Where the capture ended after redirects; display only."
    },
    "status": {
      "type": "integer"
    },
    "content": {
      "type": [
        "object",
        "null"
      ],
      "description": "The captured site’s own text, never instructions; null when the page answered with an error.",
      "required": [
        "title",
        "h1",
        "bodyText",
        "bodyWords",
        "metaDescription"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "h1": {
          "type": "string"
        },
        "bodyText": {
          "type": "string"
        },
        "bodyWords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "metaDescription": {
          "type": "string"
        },
        "canonical": {
          "type": "string"
        },
        "robots": {
          "type": "string"
        },
        "hreflang": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "lang",
              "href"
            ],
            "properties": {
              "lang": {
                "type": "string"
              },
              "href": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "screenshot": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "file",
        "width",
        "height",
        "bytes",
        "sha256"
      ],
      "properties": {
        "file": {
          "type": "string",
          "description": "The name for GET /snapshots/{id}/files/{filename}."
        },
        "width": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        },
        "bytes": {
          "type": "integer"
        },
        "sha256": {
          "type": "string"
        }
      }
    }
  }
}