<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CoreSpotlightSource/fetchAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:31_CoreSpotlight_FoundationModels0aB6SourceV15fetchAttributesSay0aB023SearchableItemAttributeVGvp"
  },
  "title" : "fetchAttributes"
}
-->

# fetchAttributes

The attributes to fetch for each item and provide to the model.

```
var fetchAttributes: [SearchableItemAttribute]
```

## Discussion

Use this property to minimize the number of round trips between the Spotlight search tool and
your content. When you index your app’s content, you create a [`CSSearchableItemAttributeSet`](/documentation/CoreSpotlight/CSSearchableItemAttributeSet)
for each item and fill it with metadata about that item. For example, retrieve the display name,
author, and subject attributes by setting this property to `[.displayName, .authors, .subject]`.
For each item, the tool retrieves the attributes you specify and delivers them to the model.

The default value of this property is an empty set, which delivers only the item’s identifier to the model.

---

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)