---
title: fetchAttributes
framework: corespotlight
role: symbol
role_heading: Instance Property
path: corespotlight/corespotlightsource/fetchattributes
---

# fetchAttributes

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

## Declaration

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

## Discussion

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

## See Also

### Configuring the search options

- [sourceOptions](corespotlight/corespotlightsource/sourceoptions.md)
- [maximumResultCount](corespotlight/corespotlightsource/maximumresultcount.md)
