VideosAPI

class minim.api.tidal.VideosAPI(client: APIClient, /)[source]

Bases: TIDALResourceAPI

Videos API endpoints for the TIDAL API.

Important

This class is managed by TIDALAPIClient and should not be instantiated directly.

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

get_user_saved_videos

User Collection Videos > Get Items Relationship: Get TIDAL catalog information for videos in a user collection․ User Collections > Get Videos Relationship: Get TIDAL catalog information for videos in a user's collection.

get_video_albums

Videos > Get Albums Relationship: Get TIDAL catalog information for albums containing a video.

get_video_artists

Videos > Get Artists Relationship: Get TIDAL catalog information for the artists of a video.

get_video_providers

Videos > Get Providers Relationship: Get TIDAL catalog information for the providers of a video.

get_video_thumbnail

Videos > Get Thumbnail Relationship: Get TIDAL catalog information for the thumbnail for a video.

get_video_usage_rules

Videos > Get Usage Rules Relationship: Get TIDAL catalog information for the usage rules for a video.

get_videos

Videos > Get Single Video: Get TIDAL catalog information for a video․ Videos > Get Multiple Videos: Get TIDAL catalog information for multiple videos.

remove_saved_videos

User Collection Videos > Delete from Items Relationship: Remove videos from a user collection․ User Collections > Delete from Videos Relationship: Remove videos from a user's collection.

save_videos

User Collection Videos > Add to Items Relationship: Add videos to a user collection․ User Collections > Add to Videos Relationship: Add videos to a user's collection.

search_videos

Search Results > Get Videos Relationship: Search for videos in the TIDAL catalog.

get_user_saved_videos(*, collection_id: str | None = None, user_id: int | str | None = None, country_code: str | None = None, locale: str | None = None, include_metadata: bool = False, cursor: str | None = None, sort_by: str | None = None, descending: bool | None = None) dict[str, Any][source]

User Collection Videos > Get Items Relationship: Get TIDAL catalog information for videos in a user collection․ User Collections > Get Videos Relationship: Get TIDAL catalog information for videos in a user’s collection.

Authorization scope

collection.read scope

Read access to a user’s collection.

Important

At most one of collection_id or user_id must be provided. If user_id is provided, the legacy GET /userCollections/{user_id}/relationships/videos endpoint is used.

Parameters:
collection_idstr; keyword-only; optional

TIDAL ID of the user collection. If authenticated, "me" can be used in lieu of a TIDAL ID for the current user’s collection. If not specified, "me" is used.

user_idint or str; keyword-only; optional

TIDAL ID of the user.

country_codestr; keyword-only; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

localestr; keyword-only; optional

IETF BCP 47 language tag.

include_metadatabool; keyword-only; default: False

Whether to include metadata for the videos in the user’s collection.

cursorstr; keyword-only; optional

Cursor for fetching the next page of results.

Example: "3nI1Esi".

sort_bystr; keyword-only; optional

Field to sort the videos by.

Valid values: "addedAt", "artists.name", "duration", "title".

descendingbool; keyword-only; optional

Whether to sort in descending order.

API default: False.

Returns:
videosdict[str, Any]

Page of TIDAL metadata for the videos in the user’s collection.

get_video_albums(video_id: int | str, /, country_code: str | None = None, *, include_metadata: bool = False, cursor: str | None = None) dict[str, Any][source]

Videos > Get Albums Relationship: Get TIDAL catalog information for albums containing a video.

Parameters:
video_idint or str; positional-only

TIDAL ID of the video.

Examples: 53315642, "75623239".

country_codestr; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

include_metadatabool; keyword-only; default: False

Whether to include metadata for the albums containing the video.

cursorstr; keyword-only; optional

Cursor for fetching the next page of results.

Example: "3nI1Esi".

Returns:
albumsdict[str, Any]

Page of TIDAL metadata for the albums containing the videos.

get_video_artists(video_id: int | str, /, country_code: str | None = None, *, include_metadata: bool = False, cursor: str | None = None) dict[str, Any][source]

Videos > Get Artists Relationship: Get TIDAL catalog information for the artists of a video.

Parameters:
video_idint or str; positional-only

TIDAL ID of the video.

Examples: 53315642, "75623239".

country_codestr; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

include_metadatabool; keyword-only; default: False

Whether to include metadata for the video’s artists.

cursorstr; keyword-only; optional

Cursor for fetching the next page of results.

Example: "3nI1Esi".

Returns:
artistsdict[str, Any]

Page of TIDAL metadata for the video’s artists.

get_video_providers(video_id: int | str, /, country_code: str | None = None, *, include_metadata: bool = False, cursor: str | None = None) dict[str, Any][source]

Videos > Get Providers Relationship: Get TIDAL catalog information for the providers of a video.

Parameters:
video_idint or str; positional-only

TIDAL ID of the video.

Examples: 53315642, "75623239".

country_codestr; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

include_metadatabool; keyword-only; default: False

Whether to include metadata for the video’s providers.

cursorstr; keyword-only; optional

Cursor for fetching the next page of results.

Example: "3nI1Esi".

Returns:
providersdict[str, Any]

Page of TIDAL metadata for the video’s providers.

get_video_thumbnail(video_id: int | str, /, country_code: str | None = None, *, include_metadata: bool = False, cursor: str | None = None) dict[str, Any][source]

Videos > Get Thumbnail Relationship: Get TIDAL catalog information for the thumbnail for a video.

Parameters:
video_idint or str; positional-only

TIDAL ID of the video.

Examples: 53315642, "75623239".

country_codestr; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

include_metadatabool; keyword-only; default: False

Whether to include metadata for the video’s thumbnail.

cursorstr; keyword-only; optional

Cursor for fetching the next page of results.

Example: "3nI1Esi".

Returns:
thumbnaildict[str, Any]

Page of TIDAL metadata for the video’s thumbnail.

get_video_usage_rules(video_id: int | str, /, *, include_metadata: bool = False, share_code: str | None = None) dict[str, Any][source]

Videos > Get Usage Rules Relationship: Get TIDAL catalog information for the usage rules for a video.

Parameters:
video_idint or str; positional-only

TIDAL ID of the video.

Examples: 53315642, "75623239".

include_metadatabool; keyword-only; default: False

Whether to include metadata for the track’s usage rules.

share_codestr; keyword-only; optional

Share code that grants access to unlisted resources.

Returns:
usage_rulesdict[str, Any]

TIDAL metadata for the video’s usage rules.

get_videos(video_ids: int | str | Collection[int | str] | None = None, /, *, isrcs: str | Collection[str] | None = None, country_code: str | None = None, expand: str | Collection[str] | None = None) dict[str, Any][source]

Videos > Get Single Video: Get TIDAL catalog information for a video․ Videos > Get Multiple Videos: Get TIDAL catalog information for multiple videos.

Important

Exactly one of video_ids or isrcs must be provided. If video_ids is specified, the request will always be sent to the endpoint for multiple videos.

Parameters:
video_idsint, str, or Collection[int | str]; positional-only; optional

TIDAL IDs of the videos.

Examples: 53315642, "75623239", [53315642, "75623239"].

isrcsstr or Collection[str]; keyword-only; optional

International Standard Recording Codes (ISRCs) of the videos.

Examples: "QMJMT1701237", [QMJMT1701237, "USAT21404265"].

country_codestr; keyword-only; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

expandstr or Collection[str]; keyword-only; optional

Related resources to include metadata for in the response.

Valid values: "albums", "artists", "credits", "providers", "replacement", "similarVideos", "suggestedVideos", "thumbnailArt", "usageRules".

Examples: "thumbnailArt", ["albums", "artists"].

Returns:
videosdict[str, Any]

TIDAL metadata for the videos.

remove_saved_videos(video_ids: str | dict[str, int | str] | Collection[int | str | dict[str, int | str]], /, *, collection_id: str | None = None, user_id: int | str | None = None, country_code: str | None = None) None[source]

User Collection Videos > Delete from Items Relationship: Remove videos from a user collection․ User Collections > Delete from Videos Relationship: Remove videos from a user’s collection.

Authorization scope

collection.write scope

Write access to a user’s collection.

Important

At most one of collection_id or user_id must be provided. If user_id is provided, the legacy DELETE /userCollections/{user_id}/relationships /videos endpoint is used.

Parameters:
video_idsint, str, dict[str, int | str], or Collection[int | str | dict[str, int | str]]; positional-only

TIDAL IDs and/or resource identifiers of the videos.

Examples:

  • 53315642

  • "75623239"

  • {"id": "75623239", "types": "videos"}

  • ["53315642", {"id": "75623239", "types": "videos"}]

collection_idstr; keyword-only; optional

TIDAL ID of the user collection. If authenticated, "me" can be used in lieu of a TIDAL ID for the current user’s collection. If not specified, "me" is used.

user_idint or str; keyword-only; optional

TIDAL ID of the user.

save_videos(video_ids: str | dict[str, int | str] | Collection[int | str | dict[str, int | str]], /, *, collection_id: str | None = None, user_id: int | str | None = None, country_code: str | None = None) None[source]

User Collection Videos > Add to Items Relationship: Add videos to a user collection․ User Collections > Add to Videos Relationship: Add videos to a user’s collection.

Authorization scope

collection.write scope

Write access to a user’s collection.

Important

At most one of collection_id or user_id must be provided. If user_id is provided, the legacy POST /userCollections/{user_id}/relationships/videos endpoint is used.

Parameters:
video_idsint, str, dict[str, int | str], or Collection[int | str | dict[str, int | str]]; positional-only

TIDAL IDs and/or resource identifiers of the videos.

Examples:

  • 53315642

  • "75623239"

  • {"id": "75623239", "types": "videos"}

  • ["53315642", {"id": "75623239", "types": "videos"}]

collection_idstr; keyword-only; optional

TIDAL ID of the user collection. If authenticated, "me" can be used in lieu of a TIDAL ID for the current user’s collection. If not specified, "me" is used.

user_idint or str; keyword-only; optional

TIDAL ID of the user.

country_codestr; keyword-only; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

search_videos(query: str, /, country_code: str | None = None, *, include_explicit: bool | None = None, include_metadata: bool = False, cursor: str | None = None) dict[str, Any][source]

Search Results > Get Videos Relationship: Search for videos in the TIDAL catalog.

Parameters:
querystr; positional-only

Search query.

country_codestr; optional

ISO 3166-1 alpha-2 country code.

Example: "US".

include_explicitbool; keyword-only; optional

Whether to include items with explicit language.

API default: True.

include_metadatabool; keyword-only; default: False

Whether to include metadata for the matching videos.

cursorstr; keyword-only; optional

Cursor for fetching the next page of results.

Example: "3nI1Esi".

Returns:
videosdict[str, Any]

Page of TIDAL metadata for the matching videos.