Skip to content

About

A dynamic SVG widget to display your recently played Last.fm tracks on your GitHub Profile README. Serverless API ready for Vercel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🎵 Last.fm Recently Played SVG Widget

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!

👀 Live Preview

Here is a live example of what the widget looks like (showing my actual recent tracks!):


🚀 Quick Start (The Easy Way)

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=3 to any number (e.g., limit=1 or limit=5) to adjust how many songs you want to display.

🛠️ Self-Hosting (For Developers)

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.

🤔 Why am I getting a "404 Not Found" error?

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


👨‍💻 Credits

Built, customized, and maintained with ❤️ by Hamnurz.

Happy listening and happy coding! 🎧

About

A dynamic SVG widget to display your recently played Last.fm tracks on your GitHub Profile README. Serverless API ready for Vercel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages