PrivateVideosAPI

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

Bases: PrivateTIDALResourceAPI

Videos API endpoints for the private TIDAL API.

Important

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

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

block_video

Block a video for a user.

get_user_blocked_videos

Get TIDAL catalog information for videos blocked by a user.

get_user_saved_videos

Get TIDAL catalog information for videos in a user's collection.

get_video

Get TIDAL catalog information for a video.

get_video_contributors

Get TIDAL catalog information for contributors to a video.

get_video_media_info

Get TIDAL media information for a video.

get_video_page

Get the TIDAL page layout for a video.

remove_saved_videos

Remove videos from a user's collection.

save_videos

Add videos to a user's collection.

unblock_video

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: 1 to 100.

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.

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: 1 to 100.

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.

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.

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: 1 to 100.

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.

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.

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.

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.

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.