{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-htmlmedia-discovery-response-schema.json",
  "title": "HTMLMediaDiscoveryResponse",
  "description": "Response containing discovered media files from HTML page",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-media-extraction-api-openapi.yml#/components/schemas/HTMLMediaDiscoveryResponse",
  "properties": {
    "source_url": {
      "type": "string",
      "title": "Source Url",
      "description": "Original URL that was parsed"
    },
    "page_title": {
      "type": "string",
      "title": "Page Title",
      "description": "Title of the HTML page"
    },
    "page_description": {
      "type": "string",
      "title": "Page Description",
      "description": "Description of the HTML page"
    },
    "total_files": {
      "type": "integer",
      "title": "Total Files",
      "description": "Total number of media files discovered"
    },
    "audio_files": {
      "items": {
        "$ref": "#/$defs/DiscoveredMediaFile"
      },
      "type": "array",
      "title": "Audio Files",
      "description": "List of discovered audio files"
    },
    "video_files": {
      "items": {
        "$ref": "#/$defs/DiscoveredMediaFile"
      },
      "type": "array",
      "title": "Video Files",
      "description": "List of discovered video files"
    },
    "audio_count": {
      "type": "integer",
      "title": "Audio Count",
      "description": "Number of audio files found"
    },
    "video_count": {
      "type": "integer",
      "title": "Video Count",
      "description": "Number of video files found"
    },
    "discovery_method": {
      "type": "string",
      "title": "Discovery Method",
      "description": "Method used for discovery"
    }
  },
  "type": "object",
  "required": [
    "source_url",
    "page_title",
    "page_description",
    "total_files",
    "audio_files",
    "video_files",
    "audio_count",
    "video_count",
    "discovery_method"
  ],
  "$defs": {
    "DiscoveredMediaFile": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url",
          "description": "Direct URL to the media file"
        },
        "file_type": {
          "type": "string",
          "title": "File Type",
          "description": "Type of media file (audio/video)"
        },
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Title or name of the media file"
        },
        "format": {
          "type": "string",
          "title": "Format",
          "description": "File format/extension"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Size",
          "description": "File size in bytes"
        },
        "estimated_size_mb": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Estimated Size Mb",
          "description": "Estimated file size in MB"
        },
        "duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration",
          "description": "Duration if available"
        }
      },
      "type": "object",
      "required": [
        "url",
        "file_type",
        "title",
        "format"
      ],
      "title": "DiscoveredMediaFile",
      "description": "Information about a discovered media file"
    }
  }
}