> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rocksky.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a user's year-in-review Wrapped stats



## OpenAPI

````yaml /api-reference/openapi.json get /app.rocksky.stats.getWrapped
openapi: 3.1.0
info:
  title: AT Protocol XRPC API
  summary: >-
    An unofficial conversion of AT Protocol's lexicons to OpenAPI's schema
    format.
  version: 0.0.0
  license:
    name: MIT License
    identifier: MIT
servers:
  - url: https://api.rocksky.app/xrpc/
    description: AT Protocol AppView XRPC server
security: []
tags:
  - name: app.rocksky.actor
  - name: app.bsky.actor
  - name: app.rocksky.album
  - name: app.rocksky.apikey
  - name: app.rocksky.apikeys
  - name: app.rocksky.artist
  - name: app.rocksky.charts
  - name: app.rocksky.feed
  - name: app.rocksky.graph
  - name: app.rocksky.like
  - name: app.rocksky.mirror
  - name: app.rocksky.player
  - name: app.rocksky.playlist
  - name: app.rocksky.playlistItem
  - name: app.rocksky.scrobble
  - name: app.rocksky.shout
  - name: app.rocksky.song
  - name: app.rocksky.spotify
  - name: app.rocksky.stats
  - name: com.atproto.repo
paths:
  /app.rocksky.stats.getWrapped:
    get:
      tags:
        - app.rocksky.stats
      summary: Get a user's year-in-review Wrapped stats
      operationId: app.rocksky.stats.getWrapped
      parameters:
        - name: did
          in: query
          description: The DID or handle of the user
          required: true
          schema:
            type: string
            description: The DID or handle of the user
            format: at-identifier
        - name: year
          in: query
          description: The year to get wrapped stats for (defaults to current year)
          required: false
          schema:
            type: integer
            minimum: 2000
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedView'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    type: string
                    oneOf:
                      - const: InvalidRequest
                      - const: ExpiredToken
                      - const: InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
      security:
        - Bearer: []
components:
  schemas:
    app.rocksky.stats.defs.wrappedView:
      type: object
      properties:
        year:
          type: integer
        totalScrobbles:
          type: integer
          minimum: 0
        totalListeningTimeMinutes:
          type: integer
          minimum: 0
        topArtists:
          type: array
          items:
            $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedArtist'
        topTracks:
          type: array
          items:
            $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedTrack'
        topAlbums:
          type: array
          items:
            $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedAlbum'
        topGenres:
          type: array
          items:
            $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedGenreCount'
        scrobblesPerMonth:
          type: array
          items:
            $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedMonthCount'
        mostActiveDay:
          $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedDayCount'
        mostActiveHour:
          type: integer
          minimum: 0
          maximum: 23
        newArtistsCount:
          type: integer
          minimum: 0
        longestStreak:
          type: integer
          minimum: 0
        firstScrobble:
          $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedMilestone'
        lastScrobble:
          $ref: '#/components/schemas/app.rocksky.stats.defs.wrappedMilestone'
    app.rocksky.stats.defs.wrappedArtist:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the artist.
        name:
          type: string
          description: The name of the artist.
        picture:
          type: string
          description: The picture URL of the artist.
        uri:
          type: string
          description: The AT-URI of the artist.
          format: at-uri
        playCount:
          type: integer
          minimum: 0
    app.rocksky.stats.defs.wrappedTrack:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the track.
        title:
          type: string
          description: The title of the track.
        artist:
          type: string
          description: The artist of the track.
        albumArt:
          type: string
          description: The album art URL.
        uri:
          type: string
          description: The AT-URI of the track.
          format: at-uri
        artistUri:
          type: string
          description: The AT-URI of the artist.
          format: at-uri
        albumUri:
          type: string
          description: The AT-URI of the album.
          format: at-uri
        playCount:
          type: integer
          minimum: 0
    app.rocksky.stats.defs.wrappedAlbum:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the album.
        title:
          type: string
          description: The title of the album.
        artist:
          type: string
          description: The artist of the album.
        albumArt:
          type: string
          description: The album art URL.
        uri:
          type: string
          description: The AT-URI of the album.
          format: at-uri
        playCount:
          type: integer
          minimum: 0
    app.rocksky.stats.defs.wrappedGenreCount:
      type: object
      properties:
        genre:
          type: string
          description: The genre name.
        count:
          type: integer
          minimum: 0
    app.rocksky.stats.defs.wrappedMonthCount:
      type: object
      properties:
        month:
          type: integer
          minimum: 1
          maximum: 12
        count:
          type: integer
          minimum: 0
    app.rocksky.stats.defs.wrappedDayCount:
      type: object
      properties:
        date:
          type: string
          description: The date (YYYY-MM-DD).
        count:
          type: integer
          minimum: 0
    app.rocksky.stats.defs.wrappedMilestone:
      type: object
      properties:
        trackTitle:
          type: string
          description: The title of the track.
        artistName:
          type: string
          description: The name of the artist.
        timestamp:
          type: string
          description: The timestamp of the scrobble.
          format: date-time
        trackUri:
          type: string
          description: >-
            AT-URI of the track record, used to build a clickable link to the
            song page.
          format: at-uri
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````