{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://socialcrawl.dev/schemas/web-page.json",
  "title": "SocialCrawl Web page",
  "description": "Canonical unified web page object returned by every SocialCrawl endpoint with the WebPage/WebPageList archetype. Nullability is expressed via JSON Schema 2020-12 type arrays. Generated from the Zod schema in packages/social-api/src/schemas/canonical.ts.",
  "type": "object",
  "properties": {
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Requested URL."
    },
    "final_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Final resolved URL after redirects."
    },
    "status_code": {
      "type": [
        "number",
        "null"
      ],
      "description": "HTTP status code observed while fetching the page."
    },
    "scrape_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque scrape identifier for follow-up interactions."
    },
    "fetched_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "Fetch timestamp when reported."
    },
    "content": {
      "type": "object",
      "description": "Extracted page content.",
      "properties": {
        "markdown": {
          "type": [
            "string",
            "null"
          ],
          "description": "Markdown body."
        },
        "html": {
          "type": [
            "string",
            "null"
          ],
          "description": "HTML body."
        },
        "raw_html": {
          "type": [
            "string",
            "null"
          ],
          "description": "Raw HTML body."
        },
        "summary": {
          "type": [
            "string",
            "null"
          ],
          "description": "Generated summary."
        }
      }
    },
    "media": {
      "type": "object",
      "description": "Short-lived media URLs returned for the page.",
      "properties": {
        "screenshot_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Screenshot URL when requested."
        },
        "audio_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Audio URL."
        },
        "video_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Video URL."
        }
      }
    },
    "extraction": {
      "type": [
        "object",
        "null"
      ],
      "description": "Structured extraction result when requested."
    },
    "fetch": {
      "type": "object",
      "description": "Vendor-neutral fetch provenance.",
      "properties": {
        "cache_state": {
          "type": [
            "string",
            "null"
          ],
          "description": "Upstream cache state when reported."
        },
        "cached_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Upstream cache timestamp when reported."
        },
        "proxy_tier": {
          "type": [
            "string",
            "null"
          ],
          "description": "Proxy tier used for the fetch."
        }
      }
    }
  },
  "additionalProperties": true
}
