<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHCollection/fetchTopLevelUserCollections(with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHCollection(cm)fetchTopLevelUserCollectionsWithOptions:"
  },
  "title" : "fetchTopLevelUserCollections(with:)"
}
-->

# fetchTopLevelUserCollections(with:)

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

```
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 [`PHFetchOptions`](/documentation/Photos/PHFetchOptions).

## Return Value

A fetch result that contains the requested [`PHCollection`](/documentation/Photos/PHCollection) objects, or an empty fetch result if no objects match the request.

---

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)