Start here
Documentation
russ.rest is a small Cloudflare Worker that exposes the Last.fm API as a
set of REST endpoints. Each endpoint accepts query-string parameters and returns
either an SVG (for embedding in GitHub READMEs and the like) or an HTML document
rendered with TRMNL Framework v2 (for use as a TRMNL polling URL).
Last.fm endpoints
SVG endpoints sourced from the Last.fm API. Suitable for embedding in GitHub READMEs, blog posts, or anywhere an image tag is accepted.
- Weekly charts
/lastfm-chart— Weekly top artists or albums rendered as an SVG with avatar, gradients, and auto-scaling text. - Last played track
/lastfm-last-played— Currently or most recently played track as an SVG with album artwork background. - Artist word cloud
/lastfm-wordcloud— Typographic cloud of your top artists, sized logarithmically by play count, packed onto the canvas.
TRMNL endpoints
HTML endpoints rendered using the TRMNL Framework v2, suitable for use as polling URLs in TRMNL Private Plugins.
- Album grid
/trmnl-lastfm-grid— 2×5 grid of your top 10 album covers from the last week. - Last played
/trmnl-lastfm-last-played— Large album artwork with track details — your currently or most recently played track. - Profile stats
/trmnl-lastfm-stats— Profile statistics and weekly top five artists. - Listening heatmap
/trmnl-lastfm-heatmap— 12-week scrobble heatmap — one column per week, seven rows for Mon–Sun, shaded by daily play count.
Usage
Every endpoint accepts a username parameter; when omitted, the default
user (RussMckendrick) is used. SVG endpoints additionally accept a
width parameter between 100 and 2000 pixels.
https://www.russ.rest/lastfm-chart?artists&username=YourUsername&width=900 Source on GitHub.