---
title: "searchableItems(forIdentifiers:searchableItemsHandler:)"
framework: corespotlight
role: symbol
role_heading: Instance Method
path: "corespotlight/cssearchableindexdelegate/searchableitems(foridentifiers:searchableitemshandler:)"
---

# searchableItems(forIdentifiers:searchableItemsHandler:)

Requests that the delegate provide searchable items for the provided identifiers.

## Declaration

```swift
optional func searchableItems(forIdentifiers identifiers: [String], searchableItemsHandler: @escaping @Sendable ([CSSearchableItem]) -> Void)
```

```swift
optional func searchableItems(forIdentifiers identifiers: [String]) async -> [CSSearchableItem]
```

## Parameters

- `identifiers`: An array of strings that represent the identifiers.
- `searchableItemsHandler`: A method the framework calls that provides an array of doc://com.apple.corespotlight/documentation/CoreSpotlight/CSSearchableItem objects.

## Discussion

Discussion Use this method to provide the framework with a list of identifiers to search for.

## See Also

### Providing data for an item

- [searchableItems(forIdentifiers:protectionClass:searchableItemsHandler:)](corespotlight/cssearchableindexdelegate/searchableitems(foridentifiers:protectionclass:searchableitemshandler:).md)
- [data(for:itemIdentifier:typeIdentifier:)](corespotlight/cssearchableindexdelegate/data(for:itemidentifier:typeidentifier:).md)
- [fileURL(for:itemIdentifier:typeIdentifier:inPlace:)](corespotlight/cssearchableindexdelegate/fileurl(for:itemidentifier:typeidentifier:inplace:).md)
