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

# StringSearchCriteria

A type that tells your app to match its items against a provided string.

```
struct StringSearchCriteria
```

## Overview

Use this type in app intents that match your app’s content against a string-based value. When you define an app intent
using the [`search`](/documentation/AppIntents/AppSchema/SystemIntent/search) schema or the [`ShowInAppSearchResultsIntent`](/documentation/AppIntents/ShowInAppSearchResultsIntent) protocol,
apply this type to the [`criteria`](/documentation/AppIntents/ShowInAppSearchResultsIntent/criteria-swift.property) property. When your app intent runs, the
system sets that property to an instance of this structure and fills it with the search term. When you use this type in your app intent,
use the accompanying [`StringSearchScope`](/documentation/AppIntents/StringSearchScope) type for the [`searchScopes`](/documentation/AppIntents/ShowInAppSearchResultsIntent/searchScopes) property.

## Topics

### Creating the search criteria

[`init(term:)`](/documentation/AppIntents/StringSearchCriteria/init(term:))

Initializes the type with the specified search term.

### Getting the search term

[`term`](/documentation/AppIntents/StringSearchCriteria/term)

The string to use when matching items in your app.

### Getting related types

[`defaultResolverSpecification`](/documentation/AppIntents/StringSearchCriteria/defaultResolverSpecification)

[`Specification`](/documentation/AppIntents/StringSearchCriteria/Specification)

[`UnwrappedType`](/documentation/AppIntents/StringSearchCriteria/UnwrappedType)

[`ValueType`](/documentation/AppIntents/StringSearchCriteria/ValueType)

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

---

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)