{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://socialcrawl.dev/schemas/media-list.json",
  "title": "SocialCrawl Media list",
  "description": "Canonical unified media-file list object returned by every SocialCrawl endpoint with the MediaList 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": {
    "items": {
      "type": "array",
      "description": "Array of media-file objects for the video (audio/video streams, subtitle tracks, or thumbnails). Each item carries the file's direct `url` plus its native technical metadata (e.g. mimeType, bitrate, quality, width/height, language). The exact fields vary by file type — this is a passthrough list, not a canonical object.",
      "items": {
        "type": "object",
        "description": "A single media file with a direct `url` and type-specific metadata.",
        "properties": {
          "url": {
            "type": "string",
            "description": "Direct URL to the media file. Audio/video stream URLs are time-limited — fetch immediately and do not cache."
          }
        }
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque cursor for the next page. Pass it back as a query parameter on endpoints that support pagination. Present only when the upstream reports more results."
    },
    "total": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Total number of matching results, when the upstream provides a count. Omitted otherwise."
    }
  },
  "additionalProperties": true
}
