PrivateVideosAPI¶
- class minim.api.tidal.PrivateVideosAPI(client: APIClient, /)[source]¶
Bases:
PrivateTIDALResourceAPIVideos API endpoints for the private TIDAL API.
Important
This class is managed by
PrivateTIDALAPIClientand should not be instantiated directly.- Parameters:
- clientminim.api._shared.APIClient
API client instance used to make HTTP requests.
Methods
Block a video for a user.
Get TIDAL catalog information for videos blocked by a user.
Get TIDAL catalog information for videos in a user's collection.
Get TIDAL catalog information for a video.
Get TIDAL catalog information for contributors to a video.
Get TIDAL media information for a video.
Get the TIDAL page layout for a video.
Remove videos from a user's collection.
Add videos to a user's collection.
Unblock a video for a user.
- block_video(video_id: int | str, /, user_id: int | str | None = None) None[source]¶
Block a video for a user.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- video_idint or str; positional-only
TIDAL ID of the video.
Examples:
29597422,"59727844".- user_idint or str; optional
TIDAL ID of the user. If not specified, the current user’s TIDAL ID is used.
- get_user_blocked_videos(user_id: int | str | None = None, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Get TIDAL catalog information for videos blocked by a user.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- user_idint or str; positional-only; optional
TIDAL ID of the user. If not specified, the current user’s TIDAL ID is used.
- limitint; keyword-only; optional
Maximum number of videos to return.
Valid range:
1to100.API default:
10.- offsetint; keyword-only; optional
Index of the first video to return. Use with limit to get the next batch of videos.
Minimum value:
0.API default:
0.
- Returns:
- videosdict[str, Any]
Page of TIDAL metadata for the videos blocked by the user.
Sample response
{ "items": [ { "created": <str>, "item": { "adSupportedStreamReady": <bool>, "adsPrePaywallOnly": <bool>, "adsUrl": <str>, "album": {}, "allowStreaming": <bool>, "artist": { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": "MAIN" }, "artists": [ { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str> } ], "djReady": <bool>, "duration": <int>, "explicit": <bool>, "id": <int>, "imageId": <str>, "imagePath": <str>, "popularity": <int>, "quality": <str>, "releaseDate": <str>, "stemReady": <bool>, "streamReady": <bool>, "streamStartDate": <str>, "title": <str>, "trackNumber": <int>, "type": <str>, "vibrantColor": <str>, "volumeNumber": <int> }, "type": "VIDEO" } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }
- get_user_saved_videos(user_id: int | str | None = None, /, country_code: str | None = None, *, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool | None = None) dict[str, Any][source]¶
Get TIDAL catalog information for videos in a user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- user_idint or str; positional-only; optional
TIDAL ID of the user. If not specified, the current user’s TIDAL ID is used.
- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".- limitint; keyword-only; optional
Maximum number of videos to return.
Valid range:
1to100.API default:
10.- offsetint; keyword-only; optional
Index of the first video to return. Use with limit to get the next batch of videos.
Minimum value:
0.API default:
0.- sort_bystr; keyword-only; optional
Field to sort the videos by.
Valid values:
"DATE"- Date added."NAME"- Video name.
API default:
"DATE".- 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.
Sample response
{ "items": [ { "created": <str>, "item": { "adSupportedStreamReady": <bool>, "adsPrePaywallOnly": <bool>, "adsUrl": <str>, "album": {}, "allowStreaming": <bool>, "artist": { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": "MAIN" }, "artists": [ { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str> } ], "djReady": <bool>, "duration": <int>, "explicit": <bool>, "id": <int>, "imageId": <str>, "imagePath": <str>, "popularity": <int>, "quality": <str>, "releaseDate": <str>, "stemReady": <bool>, "streamReady": <bool>, "streamStartDate": <str>, "title": <str>, "trackNumber": <int>, "type": <str>, "vibrantColor": <str>, "volumeNumber": <int> } } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }
- get_video(video_id: int | str, /, country_code: str | None = None) dict[str, Any][source]¶
Get TIDAL catalog information for a video.
- Parameters:
- video_idint or str; positional-only
TIDAL ID of the video.
Examples:
29597422,"59727844".- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".
- Returns:
- videodict[str, Any]
TIDAL metadata for the video.
Sample response
{ "adSupportedStreamReady": <bool>, "adsPrePaywallOnly": <bool>, "adsUrl": <str>, "album": {}, "allowStreaming": <bool>, "artist": { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": "MAIN" }, "artists": [ { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str> } ], "djReady": <bool>, "duration": <int>, "explicit": <bool>, "id": <int>, "imageId": <str>, "imagePath": <str>, "popularity": <int>, "quality": <str>, "releaseDate": <str>, "stemReady": <bool>, "streamReady": <bool>, "streamStartDate": <str>, "title": <str>, "videoNumber": <int>, "type": <str>, "vibrantColor": <str>, "volumeNumber": <int> }
- get_video_contributors(video_id: int | str, /, country_code: str | None = None, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Get TIDAL catalog information for contributors to a video.
- Parameters:
- video_idint or str; positional-only
TIDAL ID of the video.
Examples:
29597422,"59727844".- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".- limitint; keyword-only; optional
Maximum number of videos to return.
Valid range:
1to100.API default:
10.- offsetint; keyword-only; optional
Index of the first video to return. Use with limit to get the next batch of videos.
Minimum value:
0.API default:
0.
- Returns:
- contributorsdict[str, Any]
Page of TIDAL metadata for the video’s contributors.
Sample response
{ "items": [ { "name": <str>, "role": <str> } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }
- get_video_media_info(video_id: int | str, /, *, quality: str = 'HIGH', intent: str = 'STREAM', preview: bool = False) dict[str, Any][source]¶
Get TIDAL media information for a video.
Subscription
- TIDAL streaming plan
Stream full-length videos. Learn more.
- Parameters:
- video_idint or str; positional-only
TIDAL ID of the video.
Examples:
29597422,"59727844".- qualitystr; keyword-only; default:
"HIGH" Video quality.
Valid values:
"AUDIO_ONLY"– 96 kbps AAC audio only."LOW"– Up to 360p H.264 video, AAC-LC audio."MEDIUM"– Up to 720p H.264 video, AAC-LC audio."HIGH"– Up to 1080p H.264 video, AAC-LC audio.
- intentstr; keyword-only; default:
"STREAM" Playback mode or intended use of the video.
Valid values:
"OFFLINE"– Offline download."STREAM"– Streaming playback.
- previewbool; keyword-only; default:
False Whether to return a 30-second preview instead of the full video.
- Returns:
- media_infodict[str, Any]
TIDAL media information for the video.
Sample response
{ "assetPresentation": <str>, "licenseSecurityToken": <str>, "manifest": <str>, "manifestHash": <str>, "manifestMimeType": <str>, "streamType": <str>, "trackPeakAmplitude": <float>, "trackReplayGain": <float>, "videoId": <int>, "videoQuality": <str> }
- get_video_page(video_id: int | str, /, country_code: str | None = None, *, device_type: str = 'BROWSER', locale: str | None = None) dict[str, Any][source]¶
Get the TIDAL page layout 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. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".- device_typestr; keyword-only; default:
"BROWSER" Device type.
Valid values:
"BROWSER"– Web browser."DESKTOP"– Desktop TIDAL application."PHONE"– Mobile TIDAL application."TV"– Smart TV TIDAL application.
- localestr; keyword-only; optional
IETF BCP 47 language tag.
API default:
"en_US"– English (U.S.).
- Returns:
- pagedict[str, Any]
Layout for the video page.
Sample response
{ "id": <str>, "rows": [ { "modules": [ { "description": <str>, "id": <str>, "items": [ { "artifactId": <str>, "featured": <bool>, "header": <str>, "imageId": <str>, "shortHeader": <str>, "shortSubHeader": <str>, "text": <str>, "type": "VIDEO" } ], "preTitle": <str>, "title": <str>, "type": "MULTIPLE_TOP_PROMOTIONS", "width": <int> } ] }, { "modules": [ { "description": <str>, "id": <str>, "layout": <str>, "pagedList": { "dataApiPath": <str>, "items": [ { "creators": <list[Any]>, "description": <str>, "duration": <int>, "image": <str>, "lastItemAddedAt": <str>, "numberOfTracks": <int>, "numberOfVideos": <int>, "promotedArtists": [ { "contributionLinkUrl": <str>, "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str>, "userId": <int> } ], "squareImage": <str>, "title": <str>, "type": "EDITORIAL", "url": <str>, "uuid": <str> } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }, "playlistStyle": <Any>, "preTitle": <str>, "quickPlay": <bool>, "scroll": <str>, "showMore": { "apiPath": <str>, "title": <str> }, "supportsPaging": <bool>, "title": <str>, "type": "PLAYLIST_LIST", "width": <int> } ] }, { "modules": [ { "description": <str>, "id": <str>, "layout": <str>, "listFormat": <str>, "pagedList": { "dataApiPath": <str>, "items": [ { "adSupportedStreamReady": <bool>, "adsPrePaywallOnly": <bool>, "adsUrl": <str>, "album": { "cover": <str>, "id": <int>, "title": <str>, "vibrantColor": <str>, "videoCover": <str> }, "allowStreaming": <bool>, "artists": [ { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str>, "userId": <int> } ], "djReady": <bool>, "doublePopularity": <float>, "duration": <int>, "explicit": <bool>, "id": <int>, "imageId": <str>, "popularity": <int>, "releaseDate": <str>, "stemReady": <bool>, "streamReady": <bool>, "streamStartDate": <str>, "title": <str>, "trackNumber": <int>, "type": "Music Video", "url": <str>, "version": <str>, "vibrantColor": <str>, "volumeNumber": <int> } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }, "preTitle": <str>, "quickPlay": <bool>, "scroll": <str>, "showMore": { "apiPath": <str>, "title": <str> }, "showTableHeaders": <bool>, "supportsPaging": <bool>, "title": <str>, "type": "VIDEO_LIST", "width": <int> } ] } ], "selfLink": <str>, "title": "Videos" }
- remove_saved_videos(video_ids: int | str | Collection[int | str], /, user_id: int | str | None = None) None[source]¶
Remove videos from a user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- video_idsint, str, or Collection[int | str]; positional-only
TIDAL IDs of the videos.
Examples:
29597422,"59727844","29597422,59727844",[29597422, "59727844"].- user_idint or str; optional
TIDAL ID of the user. If not specified, the current user’s TIDAL ID is used.
- save_videos(video_ids: int | str | Collection[int | str], /, user_id: int | str | None = None, country_code: str | None = None, *, on_missing: str | None = None) None[source]¶
Add videos to a user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- video_idsint, str, or Collection[int | str]; positional-only
TIDAL IDs of the videos.
Examples:
29597422,"59727844","29597422,59727844",[29597422, "59727844"].- user_idint or str; optional
TIDAL ID of the user. If not specified, the current user’s TIDAL ID is used.
- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".- on_missingstr; keyword-only; optional
Behavior when the videos to be favorited cannot be found in the TIDAL catalog.
API default:
"FAIL".
- unblock_video(video_id: int | str, /, user_id: int | str | None = None) None[source]¶
Unblock a video for a user.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- video_idint or str; positional-only
TIDAL ID of the video.
Examples:
29597422,"59727844".- user_idint or str; optional
TIDAL ID of the user. If not specified, the current user’s TIDAL ID is used.