Welcome! This repository generates a beautiful, dynamic SVG image showing your most recently played songs from Last.fm, complete with album covers, dynamic colors, and relative timestamps.
Perfectly designed to be embedded in your GitHub Profile README!
Here is a live example of what the widget looks like (showing my actual recent tracks!):
Don't want to deal with code, servers, or Vercel? No problem! I have hosted a public instance that you can use instantly for free.
Just copy the HTML code below and paste it into your GitHub Profile's README.md file:
<div align="center">
<h2>🎵 Recently Played</h2>
<a href="[https://www.last.fm/user/YOUR_LASTFM_USERNAME](https://www.last.fm/user/YOUR_LASTFM_USERNAME)">
<img src="[https://lastfm-widget-api.vercel.app/api?user=YOUR_LASTFM_USERNAME&limit=3](https://lastfm-widget-api.vercel.app/api?user=YOUR_LASTFM_USERNAME&limit=3)" alt="Last.fm Recently Played" />
</a>
</div>Customization:
- Change
YOUR_LASTFM_USERNAME(in both places) to your real Last.fm username. - Change
limit=3to any number (e.g.,limit=1orlimit=5) to adjust how many songs you want to display.
If you want to host this on your own Vercel account, feel free to fork this repository and deploy it. You will need your own LASTFM_API_KEY set up in the Vercel Environment Variables.
If you deploy this yourself and click the main Vercel link (e.g., https://your-project.vercel.app/), you will see a 404: NOT_FOUND error.
Don't panic! This is 100% normal.
This project is a backend API, not a regular website. It doesn't have a front page. To see the image, you must add the endpoint and your username to the URL like this:
/api?user=YOUR_LASTFM_USERNAME
Built, customized, and maintained with ❤️ by Hamnurz.
Happy listening and happy coding! 🎧