<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/EntityCollectionSearchCriteria",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents30EntityCollectionSearchCriteriaV"
  },
  "title" : "EntityCollectionSearchCriteria"
}
-->

# EntityCollectionSearchCriteria

Search request criteria that uses an entity collection to specify the items to retrieve.

```
struct EntityCollectionSearchCriteria<Entity> where Entity : AppEntity
```

## Overview

If you implement a [`ShowInAppSearchResultsIntent`](/documentation/AppIntents/ShowInAppSearchResultsIntent) type to display your app’s search
results interface, use this type to receive the search criteria as a collection of entity
identifiers. When the system needs to display search results in your app, it creates the
[`ShowInAppSearchResultsIntent`](/documentation/AppIntents/ShowInAppSearchResultsIntent) to ask your app to display them. The system can use this
type to specify the results as a set of entity identifiers for your app to display and place
them in the `ShowInAppSearchResultsType/criteria` property of your app intent. Use the
information in this type to retrieve and display the entities.

Typically, the system creates an instance of this type and delivers it to your [`ShowInAppSearchResultsIntent`](/documentation/AppIntents/ShowInAppSearchResultsIntent).
If you donate the same app intent after someone performs a search directly from your app, you
can use this type to specify the entities your interface displayed.

## Topics

### Initializers

[`init(entities: EntityCollection<Entity>)`](/documentation/AppIntents/EntityCollectionSearchCriteria/init(entities:))

Creates a new search criteria type with the specified entity collection.

### Instance Properties

[`var entities: EntityCollection<Entity>`](/documentation/AppIntents/EntityCollectionSearchCriteria/entities)

The entity collection with the search results to display.

### Type Aliases

[`typealias Specification`](/documentation/AppIntents/EntityCollectionSearchCriteria/Specification)

[`typealias UnwrappedType`](/documentation/AppIntents/EntityCollectionSearchCriteria/UnwrappedType)

[`typealias ValueType`](/documentation/AppIntents/EntityCollectionSearchCriteria/ValueType)

### Type Properties

[`static var defaultResolverSpecification: some ResolverSpecification`](/documentation/AppIntents/EntityCollectionSearchCriteria/defaultResolverSpecification)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`SearchCriteria`](/documentation/AppIntents/SearchCriteria)

[`IntentValueConvertible`](/documentation/AppIntents/IntentValueConvertible)

[`Escapable`](/documentation/Swift/Escapable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`IntentValueExpressing`](/documentation/AppIntents/IntentValueExpressing)

[`Copyable`](/documentation/Swift/Copyable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)