---
title: "fetchTopLevelUserCollections(with:)"
framework: photos
role: symbol
role_heading: Type Method
path: "photos/phcollection/fetchtoplevelusercollections(with:)"
---

# fetchTopLevelUserCollections(with:)

Retrieves collections from the root of the photo library’s hierarchy of user-created albums and folders.

## Declaration

```swift
class func fetchTopLevelUserCollections(with options: PHFetchOptions?) -> PHFetchResult<PHCollection>
```

## Parameters

- `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.

## See Also

### Fetching Collections

- [fetchCollections(in:options:)](photos/phcollection/fetchcollections(in:options:).md)
