Show your recent Last.fm scrobbles on your GitHub profile README. Powered by Vercel.
Check out spotify-recently-played-readme for a similar integration for Spotify.
Just add the following into your README and set the query parameter user
to your Last.fm username.
![My scrobbles](https://lastfm-recently-played.vercel.app/api?user=JeffreyCA01)
[![My Last.fm](https://lastfm-recently-played.vercel.app/api?user=JeffreyCA01)](https://www.last.fm/user/JeffreyCA01)
To a custom number of tracks, pass the query parameter count
and set it to the number of tracks to display.
Default:
5
Min:1
Max:10
Example:
![My scrobbles](https://lastfm-recently-played.vercel.app/api?user=JeffreyCA01&count=1)
To set a custom card width, pass the query parameter width
and set it to the desired width in px.
Default:
400
Min:300
Max:1000
Example:
![My scrobbles](https://lastfm-recently-played.vercel.app/api?user=JeffreyCA01&width=600)
Set the loved
parameter to true
to show a heart indicator next to your loved tracks.
Default:
false
Example:
![My scrobbles](https://lastfm-recently-played.vercel.app/api?user=JeffreyCA01&loved=true)
Further customization:
You can set the loved_style
parameter to 1
, 2
, 3
, or 4
to customize the indicator placement.
Default:
1
Style 1 | Style 2 | Style 3 | Style 4 |
---|---|---|---|
Deploy your own Vercel project using the link above. Next, you'll need to set the API_KEY
environment variable to your Last.fm API key. You'll also need to set the VERCEL_URL
system environment variable in the Vercel project settings.
- Clone Git repo
$ git clone https://github.com/JeffreyCA/lastfm-recently-played-readme.git
- Install Node dependencies
$ npm install
- Create
.env
file containing the following:API_KEY=<Last.fm API key>
- Run development server
$ npm run dev
The app will be running at http://localhost:3000.