interface Track {
    album: AlbumSimplified;
    artists: ArtistSimplified[];
    available_markets: string[];
    disc_number: number;
    duration_ms: number;
    explicit: boolean;
    external_ids: ExternalIds;
    external_urls: ExternalUrls;
    href: string;
    id: string;
    is_local: boolean;
    is_playable?: boolean;
    linked_from?: {
        external_urls: ExternalUrls;
        href: string;
        id: string;
        type: string;
        uri: string;
    };
    name: string;
    popularity: number;
    preview_url: string;
    restrictions?: {
        reason: "market" | "product" | "explicit";
    };
    track_number: number;
    type: "track";
    uri: string;
}

Hierarchy (view full)

Properties

The album on which the track appears.

artists: ArtistSimplified[]

The artists who performed the track.

available_markets: string[]

The markets in which the album is available: ISO 3166-1 alpha-2 country codes. Note that an album is considered available in a market when at least 1 of its tracks is available in that market.

disc_number: number

The disc number (usually 1 unless the album consists of more than one disc).

duration_ms: number

The track length in milliseconds.

explicit: boolean

Whether or not the track has explicit lyrics.

external_ids: ExternalIds

Known external IDs for the track.

external_urls: ExternalUrls

Known external URLs for this track.

href: string

A link to the Web API endpoint providing full details of the track.

id: string

The Spotify ID for the track.

is_local: boolean

Whether or not the track is from a local file.

is_playable?: boolean

Part of the response when Track Relinking is applied. If true, the track is playable in the given market. Otherwise false.

linked_from?: {
    external_urls: ExternalUrls;
    href: string;
    id: string;
    type: string;
    uri: string;
}

Part of the response when Track Relinking is applied, and the requested track has been replaced with different track. The track in the linked_from object contains information about the originally requested track.

name: string

Name of the track.

popularity: number

The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.

preview_url: string

A link to a 30 second preview (MP3 format) of the track.

restrictions?: {
    reason: "market" | "product" | "explicit";
}

Included in the response when a content restriction is applied.

track_number: number

The number of the track. If an album has several discs, the track number is the number on the specified disc.

type: "track"

The object type: "track".

uri: string

The Spotify URI for the track.