---
title: podcasts()
framework: mediaplayer
role: symbol
role_heading: Type Method
path: mediaplayer/mpmediaquery/podcasts()
---

# podcasts()

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

## Declaration

```swift
class func podcasts() -> MPMediaQuery
```

## Return Value

Return Value A media query that matches media items of type podcast and that has a grouping type of MPMediaGrouping.podcastTitle. This query only returns podcasts downloaded to the user’s library.

## Discussion

Discussion A media item can have more than one media type; for example, an item could be of types “music” and “podcast.” A podcasts() query matches all podcast items, whether or not they’re also of other media types.

## See Also

### Creating media queries

- [albums()](mediaplayer/mpmediaquery/albums().md)
- [artists()](mediaplayer/mpmediaquery/artists().md)
- [songs()](mediaplayer/mpmediaquery/songs().md)
- [playlists()](mediaplayer/mpmediaquery/playlists().md)
- [audiobooks()](mediaplayer/mpmediaquery/audiobooks().md)
- [compilations()](mediaplayer/mpmediaquery/compilations().md)
- [composers()](mediaplayer/mpmediaquery/composers().md)
- [genres()](mediaplayer/mpmediaquery/genres().md)
- [init(filterPredicates:)](mediaplayer/mpmediaquery/init(filterpredicates:).md)
