<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMediaQuery/songs()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMediaQuery(cm)songsQuery"
  },
  "title" : "songs()"
}
-->

# songs()

Creates a media query that matches music items and that groups and sorts collections by song name.

```
class func songs() -> MPMediaQuery
```

## Return Value

A media query that matches media items of type [`music`](/documentation/MediaPlayer/MPMediaType/music) and has a grouping type of [`MPMediaGrouping.title`](/documentation/MediaPlayer/MPMediaGrouping/title).

## Discussion

A media item can have more than one media type; for example, an item could be of types “music” and “podcast.” A [`songs()`](/documentation/MediaPlayer/MPMediaQuery/songs()) query matches all [`music`](/documentation/MediaPlayer/MPMediaType/music) items, whether or not they’re also of other media types.

---

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)