get_spotify_track_info: Spotify track information

View source: R/api-access.R

get_spotify_track_infoR Documentation

Spotify track information

Description

Access the Spotify API to get metadata for audio tracks.

Usage

get_spotify_track_info(track_id, api_key = get_spotify_access_token())

Arguments

track_id

The Spotify ID for a track.

api_key

A Spotify access token, from get_spotify_access_token().

Value

A tibble with track metadata, including:

  • album_name: The name of the album the track appears on (if relevant).

  • track_name: The name of the track.

  • artist: The artist of the track.

  • featuring: The artist(s) featured on the track (if relevant).

  • duration_ms: Duration of the track in milliseconds.

  • explicit: Logical. Does the track contain explicit lyrics (TRUE) or not (FALSE).

See Also

Other API access: get_reccobeats_audio_features(), get_soundstat_audio_features()

Examples


# So High School
get_spotify_track_info(track_id = "7Mts0OfPorF4iwOomvfqn1")


taylor documentation built on Feb. 10, 2026, 5:06 p.m.