---
title: "fetchCollections(in:options:)"
framework: photos
role: symbol
role_heading: Type Method
path: "photos/phcollection/fetchcollections(in:options:)"
---

# fetchCollections(in:options:)

Retrieves collections from the specified collection list.

## Declaration

```swift
class func fetchCollections(in collectionList: PHCollectionList, options: PHFetchOptions?) -> PHFetchResult<PHCollection>
```

## Parameters

- `collectionList`: The collection list from which to fetch collections.
- `options`: Options that specify a filter predicate and sort order for the fetched collections, or nil to use default options. For details, see doc://com.apple.photokit/documentation/Photos/PHFetchOptions.

## Return Value

Return Value A fetch result that contains the requested PHCollection objects, or an empty fetch result if no objects match the request.

## Discussion

Discussion By default, the returned PHFetchResult object contains all collections in the specified collection list. To retrieve a more specific set of assets, provide a PHFetchOptions object that contains a filter predicate.

## See Also

### Fetching Collections

- [fetchTopLevelUserCollections(with:)](photos/phcollection/fetchtoplevelusercollections(with:).md)
