Gustavo Madeira Santana

Last.fm

生活服务v1.0.2
作者:Gustavo Madeira Santana更新于 2026-05-11共 3 个版本 · 最新版本发布于 2026-01-18lastfm@clawhub_gumadeiras/lastfm
娱乐推荐#Music

据 AlphaMoat 统计,截至 2026-09,Last.fm 累计下载 3,638 次、获 2 个星标,在全部 5,078 个 AI 技能中排名第 2,984 位,在「生活服务」分类(246 个)中排名第 126 位。

累计安装
148
累计下载
3,638
星标
2
全站排名
#2,984
全站前 59% · 「生活服务」前 52%
平台累计安装累计下载星标评论
ClawHub ↗1153,6242-
SkillHub ↗1483,6382—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

只读接口仍需要 API key,并需配置 Last.fm 用户名。素材中的基础 API 地址使用未加密 HTTP,可能暴露密钥和听歌数据;支持时应改用 HTTPS,避免记录包含展开参数的 URL,并使用专用密钥。查询结果还可能揭示个人听歌历史和音乐偏好。

资料发布于 2026-10-29

可以用来做什么

  • 查看最近播放曲目和当前播放信息
  • 查询个人热门艺人、专辑或曲目
  • 探索相似艺人、曲目及全球榜单

什么时候用

  • 用户已授权查询该 Last.fm 账户的听歌历史时
  • 能够使用 HTTPS 并安全保管专用 API key 时
  • 查询数据的隐私范围符合用户预期时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

说明如何通过安全连接查询指定账户的最近播放记录;不要输出 API key、完整请求 URL 或其他私人听歌资料。

月度数据趋势

累计下载3,638
2,3773,0543,7312026-03 · 累计下载 2,4702026-05 · 累计下载 2,8962026-06 · 累计下载 3,0452026-07 · 累计下载 3,3432026-08 · 累计下载 3,4982026-09 · 累计下载 3,63826-0326-09
星标2
1232026-03 · 星标 22026-05 · 星标 22026-06 · 星标 22026-07 · 星标 22026-08 · 星标 22026-09 · 星标 226-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,638—2
2026-083,498+4.6%2
2026-073,343+9.8%2
2026-063,045+5.1%2
2026-052,896—2
2026-032,470—2

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

6.1 KB · ClawHub v1.0.2
---
name: lastfm
description: Access Last.fm listening history, music stats, and discovery. Query recent tracks, top artists/albums/tracks, loved tracks, similar artists, and global charts.
---

# Last.fm API Skill

Access Last.fm listening history, music stats, and discovery.

## Configuration
展开全部(共 190 行)

**Required env vars** (add to your shell profile or optionally `~/.clawdbot/.env`):
- `LASTFM_API_KEY` — your Last.fm API key ([get one here](https://www.last.fm/api/account/create))
- `LASTFM_USER` — your Last.fm username

**Base URL**: `http://ws.audioscrobbler.com/2.0/`  
**Docs**: https://lastfm-docs.github.io/api-docs/

## Example Output

Here's what 17+ years of scrobbling looks like:

```
Total scrobbles: 519,778
Unique artists: 13,763
Unique tracks: 68,435
Unique albums: 33,637

Top Artists (all time):
• System of a Down (52,775 plays)
• Eminem (15,400 plays)
• Dashboard Confessional (10,166 plays)
• Edguy (10,161 plays)
• Metallica (9,927 plays)

Top Tracks (all time):
• System of a Down - Aerials (1,405 plays)
• System of a Down - Toxicity (1,215 plays)
• System of a Down - Sugar (1,149 plays)
• System of a Down - Chop Suey (1,116 plays)
• System of a Down - Prison Song (1,102 plays)
```

## Quick Reference

All requests use GET with these base params:
```
?api_key=$LASTFM_API_KEY&format=json&user=$LASTFM_USER
```

### User Endpoints

#### Recent Tracks (what's playing / recently played)
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json&limit=10"
```
- First track with `@attr.nowplaying=true` is currently playing
- Returns: artist, track name, album, timestamp, images

#### User Info (profile stats)
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getinfo&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json"
```
- Returns: playcount, artist_count, track_count, album_count, registered date

#### Top Artists
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.gettopartists&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json&period=7day&limit=10"
```
- `period`: overall | 7day | 1month | 3month | 6month | 12month

#### Top Albums
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.gettopalbums&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json&period=7day&limit=10"
```

#### Top Tracks
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json&period=7day&limit=10"
```

#### Loved Tracks
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getlovedtracks&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json&limit=10"
```

#### Weekly Charts
```bash
# Weekly artist chart
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getweeklyartistchart&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json"

# Weekly track chart
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getweeklytrackchart&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json"

# Weekly album chart
curl -s "http://ws.audioscrobbler.com/2.0/?method=user.getweeklyalbumchart&user=$LASTFM_USER&api_key=$LASTFM_API_KEY&format=json"
```

### Artist/Track/Album Info

#### Artist Info
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Tame+Impala&api_key=$LASTFM_API_KEY&format=json&username=$LASTFM_USER"
```
- Adding `username` includes user's playcount for that artist

#### Similar Artists
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=Tame+Impala&api_key=$LASTFM_API_KEY&format=json&limit=10"
```

#### Artist Top Tracks
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=artist.gettoptracks&artist=Tame+Impala&api_key=$LASTFM_API_KEY&format=json&limit=10"
```

#### Track Info
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=track.getinfo&artist=Tame+Impala&track=The+Less+I+Know+The+Better&api_key=$LASTFM_API_KEY&format=json&username=$LASTFM_USER"
```

#### Similar Tracks
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=track.getsimilar&artist=Tame+Impala&track=Elephant&api_key=$LASTFM_API_KEY&format=json&limit=10"
```

#### Album Info
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=album.getinfo&artist=Tame+Impala&album=Currents&api_key=$LASTFM_API_KEY&format=json&username=$LASTFM_USER"
```

### Search

#### Search Artists
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=artist.search&artist=tame&api_key=$LASTFM_API_KEY&format=json&limit=5"
```

#### Search Tracks
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=track.search&track=elephant&api_key=$LASTFM_API_KEY&format=json&limit=5"
```

#### Search Albums
```bash
curl -s "http://ws.audioscrobbler.com/2.0/?method=album.search&album=currents&api_key=$LASTFM_API_KEY&format=json&limit=5"
```

### Charts (Global)

```bash
# Top artists globally
curl -s "http://ws.audioscrobbler.com/2.0/?method=chart.gettopartists&api_key=$LASTFM_API_KEY&format=json&limit=10"

# Top tracks globally
curl -s "http://ws.audioscrobbler.com/2.0/?method=chart.gettoptracks&api_key=$LASTFM_API_KEY&format=json&limit=10"
```

### Tags

```bash
# Top albums for a tag/genre
curl -s "http://ws.audioscrobbler.com/2.0/?method=tag.gettopalbums&tag=psychedelic&api_key=$LASTFM_API_KEY&format=json&limit=10"

# Top artists for a tag
curl -s "http://ws.audioscrobbler.com/2.0/?method=tag.gettopartists&tag=brazilian&api_key=$LASTFM_API_KEY&format=json&limit=10"
```

## Useful jq Filters

For JSON processing, see the [jq skill on ClawdHub](https://clawdhub.com/skills/jq).

```bash
# Recent tracks: artist - track
jq '.recenttracks.track[] | "\(.artist["#text"]) - \(.name)"'

# Top artists: name (playcount)
jq '.topartists.artist[] | "\(.name) (\(.playcount))"'

# Check if currently playing
jq '.recenttracks.track[0] | if .["@attr"].nowplaying == "true" then "Now playing: \(.artist["#text"]) - \(.name)" else "Last played: \(.artist["#text"]) - \(.name)" end'
```

## Notes

- No auth needed for read-only endpoints (just API key)
- Rate limit: be reasonable, no hard limit documented
- URL-encode artist/track/album names (spaces → `+` or `%20`)
- Images come in sizes: small, medium, large, extralarge

「生活服务」分类下的热门技能

Gustavo Madeira Santana 的其他技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。