<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicKit",
  "identifier" : "/documentation/MusicKit/LibrarySongSortProperties",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "MusicKit"
    ],
    "preciseIdentifier" : "s:8MusicKit25LibrarySongSortPropertiesP"
  },
  "title" : "LibrarySongSortProperties"
}
-->

# LibrarySongSortProperties

Song properties your app uses to sort results for a library request.

```
protocol LibrarySongSortProperties
```

## Topics

### Instance Properties

[`var albumTitle: String?`](/documentation/MusicKit/LibrarySongSortProperties/albumTitle)

The title of the album the song appears on.

[`var artistName: String?`](/documentation/MusicKit/LibrarySongSortProperties/artistName)

The artist’s name.

[`var composerName: String?`](/documentation/MusicKit/LibrarySongSortProperties/composerName)

The name of the song’s composer.

[`var discNumber: Int?`](/documentation/MusicKit/LibrarySongSortProperties/discNumber)

The disc number of the song.

[`var duration: TimeInterval?`](/documentation/MusicKit/LibrarySongSortProperties/duration)

The duration of the song.

[`var lastPlayedDate: Date?`](/documentation/MusicKit/LibrarySongSortProperties/lastPlayedDate)

The date when the user last played the song on this device.

[`var libraryAddedDate: Date?`](/documentation/MusicKit/LibrarySongSortProperties/libraryAddedDate)

The date when the user added the song to the library.

[`var playCount: Int?`](/documentation/MusicKit/LibrarySongSortProperties/playCount)

The number of times the user played the song.

[`var title: String`](/documentation/MusicKit/LibrarySongSortProperties/title)

The title of the song.

[`var trackNumber: Int?`](/documentation/MusicKit/LibrarySongSortProperties/trackNumber)

The song’s number in the album’s track list.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)