spotifywebapipython.models.searchresponse

@export
class SearchResponse:

Spotify Web API SearchResponse object.

SearchResponse(searchCriteria: str, searchCriteriaType: str, root: dict = None)

Initializes a new instance of the class.

Arguments:
  • searchCriteria (str): Search query specified for the search.
  • searchCriteriaType (str): A comma-separated list of item types that were searched.
  • root (dict): Spotify Web API JSON response in dictionary format, used to load object attributes; otherwise, None to not load attributes.
AlbumsCount: int

The total number of album items returned in the Tracks.Items collection

An AlbumPageSimplified object that allows for multiple pages of albums to be navigated.

ArtistsCount: int

The total number of artist items returned in the Tracks.Items collection

An ArtistPage object that allows for multiple pages of artists to be navigated.

AudiobooksCount: int

The total number of audiobook items returned in the Tracks.Items collection

An AudiobookPageSimplified object that allows for multiple pages of audiobooks to be navigated.

EpisodesCount: int

The total number of episode items returned in the Tracks.Items collection

An EpisodePageSimplified object that allows for multiple pages of episodes to be navigated.

PlaylistsCount: int

The total number of playlist items returned in the Tracks.Items collection

An PlaylistPageSimplified object that allows for multiple pages of playlists to be navigated.

SearchCriteria: str

The search query used to generate the response.

SearchCriteriaType: str

The comma-separated list of item types that were searched for.

Search results include hits from all of the specified item types.

ShowsCount: int

The total number of show items returned in the Tracks.Items collection

An ShowPageSimplified object that allows for multiple pages of shows to be navigated.

TracksCount: int

The total number of track items returned in the Tracks.Items collection

A TrackPage object that allows for multiple pages of tracks to be navigated.

def GetSpotifyOwnedPlaylists( self) -> list[spotifywebapipython.models.playlistsimplified.PlaylistSimplified]:

Gets a list of all playlists contained in the underlying Playlists list that are owned by spotify:user:spotify.

def ToDictionary(self) -> dict:

Returns a dictionary representation of the class.

def ToString(self) -> str:

Returns a displayable string representation of the class.

Arguments:
  • includeItems (bool): True to include the Items collection of objects; otherwise, False to only return base properties.