ritual.sh/content/resources/lastfm-stats/index.md

937 B

title date tags description icon demo_url source_url draft
Last.fm Weekly Stats Script 2026-01-04
javascript
api
last.fm
Fetch and display your weekly listening stats from Last.fm lastfm-stats false

A handy script for pulling your weekly listening statistics from Last.fm's API. Perfect for tracking your music habits and creating weekly listening reports.

Features

  • Fetches weekly top tracks from Last.fm
  • Displays track count and listening time
  • Formats data in a clean, readable format
  • Easy to integrate into blogs or dashboards

Setup

  1. Get your Last.fm API key from Last.fm API
  2. Configure your username in the script
  3. Run the script to fetch your weekly stats

Output

The script returns your top tracks for the week, including:

  • Track name and artist
  • Play count
  • Listening duration

Great for weekly blog posts or personal music tracking!