{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fablerlabs-com/json-schema/fablerlabs-com-web-scrape-result-schema.json",
  "title": "WebScrapeResult",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fablerlabs-com-openapi.yaml#/components/schemas/WebScrapeResult",
  "type": "object",
  "required": [
    "url",
    "final_url",
    "status",
    "content_type",
    "title",
    "author",
    "date",
    "hostname",
    "excerpt",
    "text",
    "word_count",
    "truncated",
    "redirects",
    "fetched_at"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Normalized requested URL."
    },
    "final_url": {
      "type": "string",
      "format": "uri",
      "description": "Final URL after validated redirects."
    },
    "status": {
      "type": "integer"
    },
    "content_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "author": {
      "type": [
        "string",
        "null"
      ]
    },
    "date": {
      "type": [
        "string",
        "null"
      ],
      "description": "Published date metadata as supplied by the source page."
    },
    "hostname": {
      "type": "string"
    },
    "excerpt": {
      "type": "string",
      "maxLength": 500
    },
    "text": {
      "type": "string",
      "maxLength": 50000
    },
    "word_count": {
      "type": "integer",
      "minimum": 1
    },
    "truncated": {
      "type": "boolean",
      "description": "True when extracted text was capped at 50,000 characters."
    },
    "redirects": {
      "type": "array",
      "maxItems": 4,
      "items": {
        "$ref": "#/$defs/UrlSecurityRedirect"
      }
    },
    "fetched_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "UrlSecurityRedirect": {
      "type": "object",
      "required": [
        "status",
        "url",
        "location"
      ],
      "properties": {
        "status": {
          "type": "integer"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "location": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}