curl --request GET \
--url https://api.rocksky.app/xrpc/app.rocksky.stats.getWrappedimport requests
url = "https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"year": 123,
"period": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"totalScrobbles": 1,
"totalListeningTimeMinutes": 1,
"topArtists": [
{
"id": "<string>",
"name": "<string>",
"picture": "<string>",
"uri": "<string>",
"playCount": 1
}
],
"topTracks": [
{
"id": "<string>",
"title": "<string>",
"artist": "<string>",
"albumArt": "<string>",
"uri": "<string>",
"artistUri": "<string>",
"albumUri": "<string>",
"playCount": 1
}
],
"topAlbums": [
{
"id": "<string>",
"title": "<string>",
"artist": "<string>",
"albumArt": "<string>",
"uri": "<string>",
"playCount": 1
}
],
"topGenres": [
{
"genre": "<string>",
"count": 1
}
],
"scrobblesPerMonth": [
{
"month": 6,
"count": 1
}
],
"scrobblesPerDay": [
{
"date": "<string>",
"count": 1
}
],
"mostActiveDay": {
"date": "<string>",
"count": 1
},
"mostActiveHour": 11,
"newArtistsCount": 1,
"longestStreak": 1,
"firstScrobble": {
"trackTitle": "<string>",
"artistName": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trackUri": "<string>"
},
"lastScrobble": {
"trackTitle": "<string>",
"artistName": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trackUri": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Get a user's Wrapped stats for a year or a recent rolling window
curl --request GET \
--url https://api.rocksky.app/xrpc/app.rocksky.stats.getWrappedimport requests
url = "https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rocksky.app/xrpc/app.rocksky.stats.getWrapped")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"year": 123,
"period": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"totalScrobbles": 1,
"totalListeningTimeMinutes": 1,
"topArtists": [
{
"id": "<string>",
"name": "<string>",
"picture": "<string>",
"uri": "<string>",
"playCount": 1
}
],
"topTracks": [
{
"id": "<string>",
"title": "<string>",
"artist": "<string>",
"albumArt": "<string>",
"uri": "<string>",
"artistUri": "<string>",
"albumUri": "<string>",
"playCount": 1
}
],
"topAlbums": [
{
"id": "<string>",
"title": "<string>",
"artist": "<string>",
"albumArt": "<string>",
"uri": "<string>",
"playCount": 1
}
],
"topGenres": [
{
"genre": "<string>",
"count": 1
}
],
"scrobblesPerMonth": [
{
"month": 6,
"count": 1
}
],
"scrobblesPerDay": [
{
"date": "<string>",
"count": 1
}
],
"mostActiveDay": {
"date": "<string>",
"count": 1
},
"mostActiveHour": 11,
"newArtistsCount": 1,
"longestStreak": 1,
"firstScrobble": {
"trackTitle": "<string>",
"artistName": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trackUri": "<string>"
},
"lastScrobble": {
"trackTitle": "<string>",
"artistName": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"trackUri": "<string>"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Query Parameters
The DID or handle of the user
The year to get wrapped stats for (defaults to current year)
x >= 2000The window to compute stats over: a calendar year (see year), or a rolling window ending now. Defaults to year.
Response
Success
The year of the wrapped stats.
The window the stats cover.
Inclusive start of the window.
Exclusive end of the window.
Total scrobbles in the year.
x >= 0Total listening time in minutes.
x >= 0Top 5 artists by play count.
Show child attributes
Show child attributes
Top 5 tracks by play count.
Show child attributes
Show child attributes
Top 6 albums by play count.
Show child attributes
Show child attributes
Top genres by play count.
Show child attributes
Show child attributes
Scrobble counts per month.
Show child attributes
Show child attributes
Scrobble counts per day (UTC), only days with plays.
Show child attributes
Show child attributes
The most active day of the year.
Show child attributes
Show child attributes
The most active hour of the day (0-23).
0 <= x <= 23Number of artists heard for the first time this year.
x >= 0Longest consecutive days streak.
x >= 0The first scrobble of the year.
Show child attributes
Show child attributes
The last scrobble of the year.
Show child attributes
Show child attributes