{
  "description": "The results of an audio search: matching artists, albums, tracks, playlists, shows and episodes.",
  "type": "object",
  "properties": {
    "artists": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Artist information",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the artist",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Artist name",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false,
        "title": "Artist"
      },
      "description": "Artist results"
    },
    "albums": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Album information",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the album",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Album name",
            "minLength": 1
          },
          "artists": {
            "type": "array",
            "items": {
              "$ref": "#/properties/artists/items"
            },
            "description": "Album artists"
          }
        },
        "required": [
          "id",
          "name",
          "artists"
        ],
        "additionalProperties": false,
        "title": "Album"
      },
      "description": "Album results"
    },
    "tracks": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Track information",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the track",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Track name",
            "minLength": 1
          },
          "artists": {
            "type": "array",
            "items": {
              "$ref": "#/properties/artists/items"
            },
            "description": "Track artists"
          },
          "album": {
            "description": "Track album when supplied by the provider. Omitted for sources such as YouTube videos that do not supply album metadata.",
            "allOf": [
              {
                "$ref": "#/properties/albums/items"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "artists"
        ],
        "additionalProperties": false,
        "title": "Track"
      },
      "description": "Track results"
    },
    "playlists": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the playlist",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Playlist name",
            "minLength": 1
          },
          "ownerId": {
            "type": "string",
            "description": "Provider-scoped owner identity, when supplied by the provider."
          },
          "ownerName": {
            "type": "string",
            "description": "Owner display name, useful for distinguishing owned and followed playlists."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false,
        "title": "Playlist"
      },
      "description": "Playlist results"
    },
    "shows": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Provider-qualified podcast series; read episodes before playback.",
        "properties": {
          "id": {
            "title": "MediaId",
            "type": "string",
            "minLength": 1,
            "example": "portos-media://portoperatingsystem.com/spotify/audio/track/Ab123",
            "pattern": "^(portos-media://(portpowered[.]com|portoperatingsystem[.]com)/[a-z][a-z0-9_-]*/(audio|video|image)/[a-z][a-z0-9_-]*/([^/?#\\s]|%[0-9A-Fa-f]{2})+|https?://[^\\s]+|portos://[^\\s]+)$",
            "description": "Exact provider resource identity. The canonical form is portos-media://portoperatingsystem.com/provider/media-type/resource-kind/resource-id, with no URI version. Spotify emits audio track, playlist, album, artist, show and episode identities. The prior authority remains readable. YouTube and YouTube Music share provider youtube, with video/video and video/channel resource kinds. Copy an ID returned by search or library discovery; do not send a search phrase as an ID. See https://portoperatingsystem.com/docs/media.\n"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "publisher": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false,
        "title": "PodcastShow"
      }
    },
    "episodes": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Provider-qualified podcast episode with selection metadata.",
        "properties": {
          "id": {
            "$ref": "#/properties/shows/items/properties/id"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "showId": {
            "$ref": "#/properties/shows/items/properties/id"
          },
          "releaseDate": {
            "type": "string",
            "description": "Provider release date; precision can be year, month or day."
          },
          "releaseDatePrecision": {
            "type": "string",
            "description": "Provider date precision."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false,
        "title": "PodcastEpisode"
      }
    },
    "nextToken": {
      "type": "string",
      "minLength": 1,
      "description": "Opaque continuation for the same search; omit when exhausted."
    }
  },
  "required": [
    "artists",
    "albums",
    "tracks",
    "playlists"
  ],
  "additionalProperties": false
}
