fuzzy_search_spotify: Search Spotify for a artist/song combination.

View source: R/spotfuzz.r

fuzzy_search_spotifyR Documentation

Search Spotify for a artist/song combination.

Description

Return essential metadata as a tibble containing artist, track name, album name, track number, release date and spotify track uri. This will try to iteratively loosen the search parameters if no result is returned. First, it will see if the artist can be stripped to a single name. Then it will try using just the longest word in the song title and finally the second longest. Will return a tibble with all NAs if search fails. False positives with song words in common are rejected if the whole title is substially different. Vectorized along artist and track name. It's not perfect.

Usage

fuzzy_search_spotify(artists, tracks, progress = FALSE)

Arguments

artists

string with artist name

tracks

string with song name

progress

logical. If true, show track being searched and whether search is successful

Value

tibble(artist, track name, album name, track number, release date and spotify track uri)

Examples

fuzzy_search_spotify("Rush","Tom Sawyer")

apsteinmetz/spotfuzz documentation built on April 16, 2022, 12:56 p.m.