Endpoints

Here we list out all the endpoints for given portions of the API

Permissions

Certain endpoints require special permissions that would need elevated authentication methods

Albums

Album endpoints are somewhat limited but can be combined with other calls to become very powerful

Spotify.album_getMethod
album_get(album_id; market="US")

Summary: Get Spotify catalog information for a single album.

Arguments

  • album_id : The Spotify ID for the album.

Optional keywords

market : An ISO 3166-1 alpha-2 country code. Default is set to "US".

Example

ulia> Spotify.album_get("5XgEM5g3xWEwL4Zr6UjoLo")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 18 entries:
  :album_type             => "album"
  :artists                => JSON3.Object[{…
  :copyrights             => JSON3.Object[{…
  :external_ids           => {…
  :external_urls          => {…
  :genres                 => Union{}[]
source
Spotify.album_get_tracksMethod
album_get_tracks(album_id; limit=20, offset=0, market="US")

Summary: Get Spotify catalog information about an album's tracks. Optional parameters can be used to limit the number of tracks returned.

Arguments

album_id : The Spotify ID for the album

Optional keywords

limit : The maximum number of tracks to return. Default is set to 20. offset : The index of the first track to return. Default is 0. market : An ISO 3166-1 alpha-2 country code. Default is set to "US".

Example

julia> Spotify.album_get_tracks("5XgEM5g3xWEwL4Zr6UjoLo")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 7 entries:
  :href     => "https://api.spotify.com/v1/albums/5XgEM5g3xWEwL4Zr6UjoLo/tracks?offset=0&limit=20&market=US"
  :items    => JSON3.Object[{…
  :limit    => 20
  :next     => "https://api.spotify.com/v1/albums/5XgEM5g3xWEwL4Zr6UjoLo/tracks?offset=20&limit=20&market=US"
source
Spotify.artist_get_albumsMethod
artist_get_albums(artist_id; include_groups="None", country="US", limit=20, offset=0)

Summary: Get Spotify catalog information about an artist's albums.

Arguments

  • artist_id : The Spotify ID of the artist

Optional keywords

  • include_groups : A comma-separated list of keywords that will be used to filter the response. If not supplied, all album types will be returned. Valid values are: * album * single * compilation * appears_on
  • country : An ISO 3166-1 alpha-2 country code string. Use this to limit the response to one particular geographical market. Default is set to "US".
  • limit : The maximum number of tracks to return. Default is set to 20.
  • offset : The index of the first track to return. Default is 0.

Example

julia> Spotify.artist_get_albums("0YC192cP3KPCRWx8zr8MfZ")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 10 entries:
  :external_urls => {…
  :followers     => {…
  :genres        => ["german soundtrack", "soundtrack"]
  :href          => "https://api.spotify.com/v1/artists/0YC192cP3KPCRWx8zr8MfZ"
source
Spotify.library_check_saved_albumsMethod

Check User's Saved Albums

Summary: Check if one or more albums is already saved in the current Spotify user's 'Your Music' library.

album_ids Required: A comma separated list of the Spotify IDs for the albums. Max 50.

Required

source
Spotify.library_get_saved_albumsFunction

Get a User's Saved Albums

Summary: Get a list of the albums saved in the current Spotify user's 'Your Music' library.

limit Optional: The maximum number of objects to return. Default 20. Minimum 1. Maximum 50.

offset Optional: The index of the first object to return. Default 0.

market Optional: An ISO 3166-1 alpha-2 country code.

Reference

source
Spotify.library_remove_albumsMethod

Remove Albums for Current User

Summary: Remove one or more albums for the current user's 'Your Music' library.

album_ids Required: A comma-separated list of the Spotify IDs. Maximum 50.

Reference

source
Spotify.library_save_albumMethod

Save Albums for Current User

** Summary**: Save one or more albums to the current user's 'Your Music' library.

album_ids Required: A comma-separated list of Spotify IDs. Maximum 50.

Reference

source

Artist

Spotify.artist_getMethod
artist_get(artist_id)

Summary: Get Spotify catalog information for a single artist identified by their unique Spotify ID.

Arguments

  • artist_id : The Spotify artist ID.

Example

julia> Spotify.artist_get("0YC192cP3KPCRWx8zr8MfZ")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 10 entries:
  :external_urls => {…
  :followers     => {…
  :genres        => ["german soundtrack", "soundtrack"]
  :href          => "https://api.spotify.com/v1/artists/0YC192cP3KPCRWx8zr8MfZ"
source
Spotify.artist_get_related_artistsMethod
artist_get_related_artists(artist_id)

Summary: Get spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.

Arguments

  • artist_id : The Spotify ID of the artist

Example

julia> Spotify.artist_get_related_artists("0YC192cP3KPCRWx8zr8MfZ")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :artists => JSON3.Object[{…
source
Spotify.artist_top_tracksMethod
artist_top_tracks(artist_id; country="US")

Summary: Get Spotify catalog information about an artist's top tracks by country.

Arguments

  • artist_id : The Spotify ID of the artist

Optional keywords

  • country : An ISO 3166-1 alpha-2 country code string. Use this to limit the response to one particular geographical market. Default is set to "US".

Example

julia> Spotify.artist_top_tracks("0YC192cP3KPCRWx8zr8MfZ")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :tracks => JSON3.Object[{…
source
Spotify.follow_artistsFunction
follow_artists(item_type::String="artist", limit::Int64=20)

Summary: Get the current user's followed artists.

Arguments

  • item_type::String Required: The ID type. Currently only artist is supported. Default artist.

  • limit::Int64 Optional: The maximum number of items to return. Default 20, Minimum 1, Maximum 50.

Example

julia> Spotify.follow_artists()[1]["artists"]
[ Info: We try the request without checking if current grant includes scope user-follow-modify.
JSON3.Object{Base.CodeUnits{UInt8, String}, SubArray{UInt64, 1, Vector{UInt64}, Tuple{UnitRange{Int64}}, true}} with 6 entries:
  :items   => JSON3.Object[{…
  :next    => nothing
  :total   => 2
  :cursors => {…
  :limit   => 20
  :href    => "https://api.spotify.com/v1/me/following?type=artist&limit=20"
source
Spotify.follow_artists_usersMethod

Follow Artists or Users

Summary: Add the current user as a follower of one or more artists or other Spotify users.

type Required: The ID type: either artist or user.

ids Required: A comma-separated list of the artists or users Spotify IDs. Maximum 50.

Reference

source
Spotify.top_artistsMethod
top_artists(;offset=0, limit=20, time_range="medium_term")

Summary: Get the current user's top artists based on calculated affinity.

Optional keywords

  • offset Optional: The index of the first tracks to return. Default 0.
  • limit Optional: The number of tracks to return. Default 20.

  • time_range Optional: Over what time frame the affinities are computed. Valid Options: * long_term : Calculated from several years of data including all new data as it becomes available * medium_term : Approx. last 6 months * short_term : Approx. last 4 weeks

source
Spotify.unfollow_artists_usersMethod

Unfollow Artists or Users

Summary: Remove the current user as a follower of one or more artists or other Spotify users.

type Required: The ID type: either artist or user.

ids Required: A comma-separated list of the artists or users Spotify IDs. Maximum 50.

Reference

source

Browse

Spotify.category_getFunction

" Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

country: (Optional) A country: ISO 3166-1 alpha-2 country code. Provide this parameter to ensure that the category exists for a particular country.

locale: (Optional) The desired language, consisting of an ISO 639-1 language code and an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: es_MX, meaning "Spanish (Mexico)". Provide this parameter if you want the category strings returned in a particular language. Note that, if locale is not supplied, or if the specified language is not available, the category strings returned will be in the Spotify default language (American English).

source
Spotify.category_get_featured_playlistFunction

Get a list of Spotify featured playlists (shown, for example, on a Spotify player’s ‘Browse’ tab).

country: (Optional) A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.

locale: (Optional) The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

offset: (Optional) The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.

timestamp: (Optional) A timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ss. Use this parameter to specify the user’s local time to get results tailored for that specific date and time in the day. If not provided, the response defaults to the current UTC time. Example: “2014-10-23T09:00:00” for a user whose local time is 9AM. If there were no featured playlists (or there is no data) at the specified time, the response will revert to the current UTC time.

source
Spotify.category_get_new_releasesFunction

Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).

country: (Optional) A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. If omitted, the returned items will be relevant to all countries.

locale: (Optional) The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

offset: (Optional) Optional. The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.

source
Spotify.category_get_playlistFunction

Get a list of Spotify playlists tagged with a particular category.

country: (Optional) A country: an ISO 3166-1 alpha-2 country code.

limit: (Optional) The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

offset: (Optional) The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.

source
Spotify.category_get_severalFunction

Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

country: (Optional) A country: an ISO 3166-1 alpha-2 country code.

limit: (Optional) The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.

offset: (Optional) The index of the first item to return. Default: 0 (the first object). Use with limit to get the next set of items.

source
Spotify.playlist_get_categoryMethod
playlist_get_category(category_id::String; country::String="US", limit::Int64=20, offset::Int64=0)

Summary: Get a list of Spotify playlists tagged with a particular category.

Arguments

  • category_id::String : The unique string identifying the Spotify category, e.g. "dinner", "party" etc.

Optional keywords

  • country::String : An ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. Default is set to "US".
  • limit::Int64 : Maximum number of items to return, default is set to 20
  • offset::Int64 : Index of the first item to return, default is set to 0

Example

julia> Spotify.playlist_get_category("party")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :playlists => {…
source

Episodes

Spotify.episodes_getFunction

Get an Episode

Summary: Get Spotify catalog information for a single peisode identified by it's unique Spotify ID.

episode_id Required: The Spotify ID for the episode_id. Up to 50 episodes can be passed, comma delimited.

market Optional: An ISO 3166-1 alpha 2 country code.

Reference

source
Spotify.show_get_episodesFunction

Get a Show's Episodes

Summary: Get Spotify catalog information about a show’s episodes. Optional parameters can be used to limit the number of episodes returned.

show_id Required: The Spotify ID for the show.

market Optional: Optional. An ISO 3166-1 alpha-2 country code. If a country code is specified, only shows and episodes that are available in that market will be returned.

limit Optional: The maximum number of episodes to return. Default = 20. Minimum 1. Maximum 50 offset Optional: The index of the first episode to return. Default: 0 (the first object). Use the limit to get the next set of episodes.

Reference

source

Follow

Spotify.follow_checkMethod
follow_check(item_type, ids)

Summary: Check to see if the current user is following one or more artists or other Spotify users.

Arguments

  • item_type::String Required: The ID type, either artist or user.
  • ids::String Required: A comma separated list of the artist or user Spotify IDs to check. Maximum 50.

Example

julia> Spotify.follow_check("artist", "7fxBPUc2bTUgl7GLuqjajk")[1]
[ Info: We try the request without checking if current grant includes scope user-follow-read.
1-element JSON3.Array{Bool, Base.CodeUnits{UInt8, String}, Vector{UInt64}}:
 1
source
Spotify.follow_check_playlistMethod
follow_check_playlist(playlist_id::String, user_id::String)

Summary: Check to see if one or more Spotify users are following a specified playlist_id.

Arguments

  • playlist_id::String Required: The Spotify ID of the playlist.
  • user_id::String Required: A comma separated list of the user Spotify IDS to check. Maximum 5.

Example

julia> Spotify.follow_check_playlist("37i9dQZF1DZ06evO3Khq6I", user_id)[1]
1-element JSON3.Array{Bool, Base.CodeUnits{UInt8, String}, Vector{UInt64}}:
 0
source
Spotify.follow_playlistMethod

Follow a Playlist

Summary: Add the currend user as a follower of a playlist.

playlist_id Required: The Spotify ID of the playlist. Any playlist can be followed regardless of it's private/public status, as long as the ID is known.

Reference

source
Spotify.unfollow_playlistMethod

Unfollow a Playlist

Summary: Remove the current user as a follower of a playlist.

playlist_id Required: The Spotify ID of the playlist. Any playlist can be followed regardless of it's private/public status, as long as the ID is known.

Reference

source

Genres

Spotify.genres_getMethod
genres_get()

Summary: Retrieve a list of available genres seed parameter values for recommendations.

Example

julia> Spotify.genres_get()[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :genres => ["acoustic", "afrobeat", "alt-rock", "alternative", "ambient", "anime", "black-metal",…
source

Library

Endpoints referenced here are included in the library section. These functions act on whoever has authorized their account to be queried. They can answer questions like

Spotify.library_check_saved_showsMethod

Check User's Saved Shows

Summary: Check if one or more shows is already saved in the current Spotify user's library.

show_ids Required: A comma separated list of the Spotify IDs for the shows. Maximum 50

Reference

source
Spotify.library_check_saved_tracksMethod

Check User's Saved Tracks

Summary: Check if one or more tracks is already saved in the current Spotify user's 'Your Music' library.

track_ids Required: A comma-separated list of the Spotify IDs for the tracks. Maximum 50.

Reference

source
Spotify.library_get_saved_showsFunction

Get a User's Saved Shows

Summary: Get a list of the songs saved in the current Spotify user's 'Your Music' library.

limit Optional: The maximum number of objects to return. Default 20. Minimum 1. Maximum 50.

offset Optional: The index of the first object to return. Default 0.

Reference

source
Spotify.library_get_saved_tracksFunction

Get a User's Saved Tracks

Summary: Get a list of the songs saved in the current Spotify user's 'Your Music' library.

limit Optional: The maximum number of objects to return. Default 20. Minimum 1. Maximum 50.

offset Optional: The index of the first object to return. Default 0.

market Optional: An ISO 3166-1 alpha-2 country code.

Reference

source
Spotify.library_remove_showsMethod

Remove Shows for Current User

Summary: Remove one or more shows for the current user's library.

show_ids Required: A comma-separated list of the Spotify IDs. Maximum 50.

Reference

source
Spotify.library_remove_tracksMethod

Remove Tracks for Current User

Summary: Remove one or more tracks for the current user's 'Your Music' library.

track_ids Required: A comma-separated list of the Spotify IDs. Maximum 50.

Reference

source
Spotify.library_save_showMethod

Save Shows for Current User

** Summary**: Save one or more shows to the current user's library.

shows_ids Required: A comma-separated list of Spotify IDs. Maximum 50.

Reference

source
Spotify.library_save_trackMethod

Save Tracks for Current User

** Summary**: Save one or more tracks to the current user's 'Your Music' library.

track_ids Required: A comma-separated list of Spotify IDs. Maximum 50.

Reference

source

Markets

Spotify.markets_getMethod
markets_get()

Summary: Get the list of markets where Spotify is available.

Example

julia> Spotify.markets_get()[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :markets => ["AD", "AE", "AG", "AL", "AM", "AO", "AR", "AT", "AU", "AZ"  …
source

Personlization

Spotify.top_tracksMethod
top_tracks(;offset=0, limit=20, time_range="medium_term")

Summary: Get the current user's top tracks based on calculated affinity.

Optional keywords

  • offset Optional: The index of the first tracks to return. Default 0.
  • limit Optional: The number of tracks to return. Default 20.

  • time_range Optional: Over what time frame the affinities are computed. Valid Options: * long_term : Calculated from several years of data including all new data as it becomes available * medium_term : Approx. last 6 months * short_term : Approx. last 4 weeks

source

Playlists

Spotify.playlist_getMethod
playlist_get(playlist_id::String; additional_types::String="track", fields::String="",
market::String="US")

Summary: Get details about a playlist owned by a Spotify user.

Arguments

  • playlist_id::String : Alphanumeric ID of the playlist

Optional keywords

  • additional_types::String : "track" (default) or "episode"
  • fields::String : Filters for the query, a comma-separated list of the fields to return. For example, to get just the added date and user ID of the adder, fields = "items(addedat,addedby.id)". Default is set to "", which means all fields are returned.
  • market::String : An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. Default is set to "US".

Example

julia> Spotify.playlist_get("37i9dQZF1E4vUblDJbCkV3")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 15 entries:
  :collaborative => false
  :description   => "With Roo Panes, Hiss Golden Messenger, Nathaniel Rateliff and more"
  :external_urls => {…
  :followers     => {…
  :href          => "https://api.spotify.com/v1/playlists/37i9dQZF1E4vUblDJbCkV3?additional_types=track"
  :id            => "37i9dQZF1E4vUblDJbCkV3"
  :images        => JSON3.Object[{…
  :name          => "Lord Huron Radio"
  :owner         => {…
  :primary_color => nothing
  :public        => false
  :snapshot_id   => "MTYzNTg2NzMxNCwwMDAwMDAwMGU3MTgwNDkzOWE5NTQ2NGM1NmYzNTYyZDhhZTc1ZGNh"
  :tracks        => {…
  :type          => "playlist"
  :uri           => "spotify:playlist:37i9dQZF1E4vUblDJbCkV3"
source
Spotify.playlist_get_cover_imageMethod
playlist_get_cover_image(playlist_id::String)

Summary: Get the current image associated with a specific playlist.

Arguments

  • playlist_id::String : Alphanumeric ID of the playlist

Example

julia> Spotify.playlist_get_cover_image("37i9dQZF1E4vUblDJbCkV3")[1]
1-element JSON3.Array{JSON3.Object, Base.CodeUnits{UInt8, String}, Vector{UInt64}}:
 {
   "height": nothing,
      "url": "https://seeded-session-images.scdn.co/v1/img/artist/6ltzsmQQbmdoHHbLZ4ZN25/en",
    "width": nothing
}
source
Spotify.playlist_get_current_userMethod
playlist_get_current_user(limit::Int64=20, offset::Int64=0)

Summary: Get a list of the playlists owned or followed by the current Spotify user.

Optional keywords

  • limit::Int64 : Maximum number of items to return, default is set to 20
  • offset::Int64 : Index of the first item to return, default is set to 0

Example

julia> Spotify.playlist_get_current_user()[1]
[ Info: We try the request without checking if current grant includes scope playlist-read-private.
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 7 entries:
  :href     => "https://api.spotify.com/v1/users/your_user_id/playlists?offset=0&limit=20"
  :items    => JSON3.Object[{…
  :limit    => 20
  :next     => nothing
  :offset   => 0
  :previous => nothing
  :total    => 2
source
Spotify.playlist_get_featuredMethod
playlist_get_featured(;country::String="US", limit::Int64=20, locale::String="en_US", 
                           offset::Int64=0, timestamp::String="2021-11-12T14:07:02.216")

Summary: Get a list of Spotify featured playlists (shown, for example, on a Spotify player's 'Browse' tab).

Optional keywords

  • country::String : An ISO 3166-1 alpha-2 country code. Provide this parameter if you want the list of returned items to be relevant to a particular country. Default is set to "US".
  • limit::Int64 : Maximum number of items to return, default is set to 20
  • locale::String : The desired language, consisting of a lowercase ISO 639-1 language code and an uppercase ISO 3166-1 alpha-2 country code, joined by an underscore. For example: esMX, meaning "Spanish (Mexico)". Provide this parameter if you want the results returned in a particular language (where available). Default is set to "enUS".
  • offset::Int64 : Index of the first item to return, default is set to 0
  • timestamp::String : A timestamp in ISO 8601 format: yyyy-MM-ddTHH:mm:ss. Use this parameter to specify the user's local time to get results tailored for that specific date and time in the day. Default is set to user's current time.

Example

julia> Spotify.playlist_get_featured(locale="en_UK")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 2 entries:
  :message   => "Tuesday jams"
  :playlists => {…
source
Spotify.playlist_get_tracksMethod
playlist_get_tracks(playlist_id::String; additional_types="track", limit=50, 
offset=0, market="US")

Summary: Get details about the items of a playlist.

Arguments

  • playlist_id::String : Alphanumeric ID of the playlist

Optional keywords

  • additional_types::String : "track" (default) or "episode"
  • fields::String : Filters for the query, a comma-separated list of the fields to return. For example, to get just the added date and user ID of the adder, fields = "items(addedat,addedby.id)". Default is set to "", which means all fields are returned.
  • limit::Int64 : Maximum number of items to return, default is set to 20
  • offset::Int64 : Index of the first item to return, default is set to 0
  • market::String : An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. Default is set to "US".

Example

julia> Spotify.playlist_get_tracks("37i9dQZF1E4vUblDJbCkV3")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 7 entries:
  :href     => "https://api.spotify.com/v1/playlists/37i9dQZF1E4vUblDJbCkV3/tracks?offset=0&limit=20&market=US&additional_types=…
  :items    => JSON3.Object[{…
  :limit    => 20
  :next     => "https://api.spotify.com/v1/playlists/37i9dQZF1E4vUblDJbCkV3/tracks?offset=20&limit=20&market=US&additional_types…
  :offset   => 0
  :previous => nothing
  :total    => 50
source
Spotify.playlist_get_userMethod
playlist_get_user(user_id::String; limit::Int64=20, offset::Int64=0)

Summary: Get a list of the playlists owned or followed by a Spotify user.

Arguments

  • user_id::String : Alphanumeric ID of the user or name (e.g. "smedjan")

Optional keywords

  • limit::Int64 : Maximum number of items to return, default is set to 20
  • offset::Int64 : Index of the first item to return, default is set to 0

Example

julia> Spotify.playlist_get_user("smedjan")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 7 entries:
  :href     => "https://api.spotify.com/v1/users/smedjan/playlists?offset=0&limit=20"
  :items    => JSON3.Object[{…
  :limit    => 20
  :next     => "https://api.spotify.com/v1/users/smedjan/playlists?offset=20&limit=20"
  :offset   => 0
  :previous => nothing
  :total    => 98
source
Spotify.search_getMethod
search_get(;q::String="Coldplay", item_type::String="track,artist", include_external::String="",
                limit::Int64=20, market::String="US", offset::Int64=0)

Summary: Get Spotify catalog information about albums, artists, playlists, tracks, shows or episodes that match a keyword string.

Optional keywords

  • q::String : Search query, e.g. "Coldplay" which is also set as the default
  • item_type::String : A comma-separated list of item types to search across. Search results include hits from all the specified item types. For example, item_type = "album,tarck" returns both albums and tracks with the search query included in their name.
  • include_external::String : If include_external="audio" is specified then the response will include any relevant audio content that is hosted externally.
  • limit::Int64 : Maximum number of items to return, default is set to 20
  • market::String : An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. Default is set to "US".
  • offset::Int64 : Index of the first item to return, default is set to 0

Example

julia> Spotify.search_get(;q = "Greenday", item_type = "album")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :albums => {…
source

Shows

Spotify.show_getFunction

Get a Show

Summary: Get a Spotify catalog information for a single show identified by it's unique Spotify ID.

show_id Required: The Spotify ID for the show. Up to 50 shows can be passed seperated with a comma. No whitespace.

market Optional: An ISO 3166-1 alpha-2 country code. If a country code is specified, only shows and episodes that are available in that market will be returned.

Reference

source

Tracks

Spotify.player_get_recent_tracksMethod
player_get_recent_tracks(;duration::Int64=1, limit::Int64=20)

Summary: Get current user's recently played tracks.

Optional keywords

  • duration::Int64 : Number of days to look in the past, default is set to 1
  • limit::Int64 : Maximum number of items to return, default is set to 20

Example

julia> Spotify.player_get_recent_tracks()[1]
[ Info: We try the request without checking if current grant includes scope user-read-recently-played.
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 5 entries:
  :items   => JSON3.Object[{…
  :next    => "https://api.spotify.com/v1/me/player/recently-played?after=1636123644988&limit=20"
  :cursors => {…
  :limit   => 20
  :href    => "https://api.spotify.com/v1/me/player/recently-played?after=1636410050&limit=20"
source
Spotify.tracks_get_audio_analysisMethod
tracks_get_audio_analysis(track_id)

Summary: Get a detailed audio analysis for a single track identified by it's unique Spotify ID.

Arguments

  • track_id: The Spotify ID for the track

Example

julia> Spotify.tracks_get_audio_analysis("6rqhFgbbKwnb9MLmUQDhG6")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 7 entries:
  :meta     => {…
  :track    => {…
  :bars     => JSON3.Object[{…
  :beats    => JSON3.Object[{…
source
Spotify.tracks_get_audio_featuresMethod
tracks_get_audio_features(track_id)

Summary: Get audio feature information for a single track identified by it's unique Spotify ID.

Arguments

  • track_id: The Spotify ID for the track

Example

julia> Spotify.tracks_get_audio_features("6rqhFgbbKwnb9MLmUQDhG6")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 18 entries:
  :danceability     => 0.592
  :energy           => 0.0196
  :key              => 1
  :loudness         => -33.35
  :mode             => 1
  :speechiness      => 0.0358
  :acousticness     => 0.362
  :instrumentalness => 0.854
source
Spotify.tracks_get_containsMethod
tracks_get_contains(ids)

Summary: Check if one or more tracks is already saved in the current Spotify user's 'Your Music' library.

Arguments

  • ids : A comma-separated list of the Spotify track IDs.

Example

julia> Spotify.tracks_get_contains("4iV5W9uYEdYUVa79Axb7Rh, 4VqPOruhp5EdPBeR92t6lQ")[1]
2-element JSON3.Array{Bool, Base.CodeUnits{UInt8, String}, Vector{UInt64}}:
 0
 0
source
Spotify.tracks_get_multipleMethod
tracks_get_multiple(ids::String; market::String="US")

Summary: Get Spotify catalog information for multiple tracks based on their Spotify IDs.

Arguments

  • ids : A comma-separated list of the Spotify IDs.

Optional keywords

  • market::String : An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. Default is set to "US".

Example

julia> Spotify.tracks_get_multiple("4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 1 entry:
  :tracks => Union{Nothing, JSON3.Object}[{…
source
Spotify.tracks_get_savedMethod
tracks_get_saved(;limit::Int64=20, market::String="US", offset::Int64=0)

Summary: Get a list of the songs saved in the current Spotify user's 'Your Music' library.

Optional keywords

  • limit::Int64 : Maximum number of items to return, default is set to 20
  • market::String : An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. Default is set to "US".
  • offset::Int64 : Index of the first item to return, default is set to 0

Example

julia> Spotify.tracks_get_saved()[1]
[ Info: We try the request without checking if current grant includes scope user-library-read.
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 7 entries:
  :href     => "https://api.spotify.com/v1/me/tracks?offset=0&limit=20&market=US"
  :items    => JSON3.Object[{…
  :limit    => 20
  :next     => "https://api.spotify.com/v1/me/tracks?offset=20&limit=20&market=US"
source
Spotify.tracks_get_singleMethod
tracks_get(track_id; market="US")

Summary: Get a spotify catalog information for a single track identified by it's unique Spotify ID.

Arguments

  • track_id : The Spotify ID for the track.

Optional keywords

  • market::String : An ISO 3166-1 alpha-2 country code. If a country code is specified, only episodes that are available in that market will be returned. Default is set to "US".

Example

julia> Spotify.tracks_get("6rqhFgbbKwnb9MLmUQDhG6")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 18 entries:
  :album         => {…
  :artists       => JSON3.Object[{…
  :disc_number   => 1
  :duration_ms   => 65314
  :explicit      => true
  :external_ids  => {…
  :external_urls => {…
source

Users

Spotify.user_get_current_profileMethod
user_get_current_profile()

**Summary**: Get detailed profile information about the current user 
            (including the current user's username).

Example

julia> Spotify.user_get_current_profile()[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 12 entries:
  :country          => "NL"
  :display_name     => "Itachi"
  :email            => "your_id@gmail.com"
  :explicit_content => {…
  :external_urls    => {…
  :followers        => {…
  :href             => "https://api.spotify.com/v1/users/your_user_id"
  :id               => "your_user_id"
  :images           => Union{}[]
  :product          => "premium"
  :type             => "user"
  :uri              => "spotify:user:your_user_id"
source
Spotify.user_get_profileMethod
user_get_profile(user_id::String)

Summary: Get public profile information about a Spotify user.

Arguments

  • user_id::String : Alphanumeric ID of the user or name (e.g. "smedjan")

Example

julia> Spotify.user_get_profile("smedjan")[1]
JSON3.Object{Base.CodeUnits{UInt8, String}, Vector{UInt64}} with 8 entries:
  :display_name  => "smedjan"
  :external_urls => {…
  :followers     => {…
  :href          => "https://api.spotify.com/v1/users/smedjan"
  :id            => "smedjan"
  :images        => Union{}[]
  :type          => "user"
  :uri           => "spotify:user:smedjan"
source