Surely if you have reached this article it is because you need to
locate a song that you have heard on Spotify recently and do not remember the name of the song or that of the artist
. This is something that happens more than we think, so it is convenient to have some
tricks
on hand
to review the history of Spotify playback
.
The
Spotify
application
has been evolving
and changes have been introduced throughout its development, but currently it
only allows us to review the last 30 artists or playlists that have sounded in the application
.
How to view the playback history of Spotify.
We will have to install the Spoyify desktop application on our PC and go to the side menu, more specifically where it says
«Listen.
recently »
. Here we can browse the last 30 artists of whom we have played songs, including even recently played playlists.
We will agree that Spotify offers a fairly poor playback history. It is very likely that this history does not help us to locate that song that we like so much and that we have lost sight of, that is why we are going to show an alternative method.
Get the full history of songs played on Spotify.
This second method will allow us to
examine all the songs we have played on Spotify for more than 30 seconds
. It is a slightly more complex method because we will use the
Spotify API
, but following the steps in this tutorial there should be no problem.
First of all we go to the developer console, which is a website enabled for developers to do their tests. Specifically, we access the URL
https://developer.spotify.com/console/get-recently-played/
from which we can obtain the last songs played.
Authenticating in the Spotify API.
Access to this section of the API requires us to be authenticated, so we follow the following steps:
-
We click on the
"Get Token" button
. In the window that appears we activate the
user-read-recently-played
option.
-
Click on the
"Request Token" button
that will ask us to authenticate with our Spotify username and password.
If we have followed the previous steps correctly, now in the
OAuth Token
section we should have an authentication chain.
Get the songs played on Spotify with the API.
Once authenticated, in the
Limit
section we will put 50, which is the maximum number of results that the API can return. By clicking on
"Try It" we will
see how a large amount of data appears in the JSON format on the right panel.
In this JSON data we will find the name of the last 50 songs played with the name of their respective artist.
You will have to have the patience to examine the results until you find what you are looking for.
Refining the search in the API.
By default, we get the last 50 songs that we have played, but we can refine the search in the history a little more using dates. Dates can be set in the
after
or
before
.
If we use the
after
section, it will be to establish that the search will be done after a certain date. However, if we use
before
, the search will be done before a certain date.
Only one of the two parameters can be set
, that is, either we use before or we use after, but never both at the same time. In addition, the dates of these parameters are entered in the
"Unix timestamp"
format in milliseconds. This may sound complex, but there are internet converters of common date to this format.
The interesting thing about refining searches is that we can obtain the reproduction history of a specific month or of a defined time interval. I know this section is more complex, but if you need help, you can use
our forum
where we will help you.