Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rewind.rest/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Listening domain tracks music listening history from Last.fm, enriched with Apple Music metadata (artwork, preview URLs, Apple Music links). Data syncs every 15 minutes via cron. Each sync fetches recent scrobbles and updates artist/album/track records.

Key endpoints

EndpointDescription
GET /listening/recentRecent scrobbles with track, artist, album, and image data
GET /listening/now-playingCurrently playing track (if any)
GET /listening/top/artistsTop artists by play count, filterable by time period
GET /listening/top/albumsTop albums by play count
GET /listening/top/tracksTop tracks by scrobble count
GET /listening/statsLifetime listening statistics
GET /listening/streaksListening streak data (consecutive days)
GET /listening/artistsBrowse all artists with pagination
GET /listening/artists/:idArtist detail with top albums and tracks

Time periods

Top list endpoints accept a period parameter:
PeriodDescription
7dayLast 7 days
1monthLast 30 days
3monthLast 90 days
6monthLast 180 days
12monthLast 365 days
overallAll time

Sparklines

GET /listening/top/artists accepts ?include_sparklines=true to attach a per-artist play-count time series, suitable for rendering an inline sparkline next to each item.
PeriodGranularityPoints
1monthday28
3monthweek13
6monthweek26
12monthweek52
points is ordered oldest to newest and zero-filled. The most recent bucket is partial (current week or current day in progress). Weekly buckets anchor on the Monday of the week. 7day and overall omit the field; treat its absence as “no sparkline”.

Filtering

Audiobooks, podcasts, and holiday music are automatically filtered from all listening endpoints. The filter system uses a combination of artist matching, album/track pattern matching, and Last.fm tag-based auto-detection.

Images

Album and artist artwork is sourced from Apple Music, Deezer, iTunes, and Last.fm. Images are stored in R2 and served via CDN with thumbhash placeholders and extracted dominant/accent colors.