Rocksky Documentation
1Rocksky offers a fully compatible implementation of the [Last.fm Audioscrobbler API](https://www.last.fm/api/show/track.scrobble) — so you can seamlessly migrate your scrobbling apps or integrations to Rocksky by simply changing the API endpoint and credentials.
2
3## Base URL
4
5Replace the Last.fm endpoint:
6
7```
8https://ws.audioscrobbler.com/2.0
9```
10
11With the Rocksky scrobble endpoint:
12
13```
14https://audioscrobbler.rocksky.app/2.0
15```
16
17## Authentication
18
19- `api_key`: Your Rocksky API key (obtainable from your [Rocksky developer dashboard](https://rocksky.app/apikeys)).
20- `sk`: Your Rocksky session key (obtained after user authentication `rocksky login`)
21
22## Legacy Last.fm API Compatibility
23Rocksky also supports older Last.fm clients using the legacy Audioscrobbler protocol (pre-2.0). You can use these legacy configurations in clients such as Deadbeef or older music players:
24
25### Legacy API Config:
26
27| **Field** | **Value** |
28|---------------|-----------|
29| Username | Your Rocksky API key (obtainable from your [Rocksky developer dashboard](https://rocksky.app/apikeys)) |
30| Password | Your Rocksky shared secret (obtainable from your [Rocksky developer dashboard](https://rocksky.app/apikeys)) |
31| Scrobble URL | https://audioscrobbler.rocksky.app |
32
33ℹ️ **Note**: Rocksky will also try to normalize songs metadata. If it cannot find a matching track, it will skip the scrobble.
34
35## Example Scrobble Request
36
37**Method**: `POST`
38**URL**: `https://audioscrobbler.rocksky.app/2.0`
39**Headers**: `Content-Type: application/x-www-form-urlencoded`
40**Body** (as `x-www-form-urlencoded`):
41
42
43| **Parameter** | **Example Value** |
44|---------------|------------------------------------|
45| method | `track.scrobble` |
46| api_key | `YOUR_API_KEY` |
47| sk | `YOUR_SESSION_KEY` |
48| artist[0] | `Radiohead` |
49| track[0] | `Karma Police` |
50| timestamp[0] | `1744579159` |
51| api_sig | `532b7492411fdfcd79639b548b5ee8a8` |
52| format | `json` |
53
54## Generating `api_sig`
55To compute the signature:
561. Sort all parameters (excluding api_sig and format) by key.
572. Concatenate key-value pairs (key1value1key2value2...).
583. Append your shared secret to the concatenated string.
594. MD5 hash the result.
60
61Example in pseudo-code:
62
63```js
64const base = "api_keyAPI_KEYartist[0]Radioheadmethodtrack.scrobbleskSESSION_KEYtimestamp[0]1744579159track[0]Karma Police";
65const sig = md5(base + shared_secret);
66```
67
68## Migrating Your App
69To switch from Last.fm to Rocksky:
701. Change the API base URL.
712. Update your API key and session key (from `rocksky login`).
723. Use the same payload format and signature method.
734. Done!
74
75## Why Switch to Rocksky?
76🔄 Open Scrobble Infrastructure
77📊 Modern analytics and detailed stats
78🔐 Built on top of [AT Protocol](https://atproto.com/) for portability
79🔧 Compatible with existing Last.fm tools