<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntentsTesting",
  "identifier" : "/documentation/AppIntentsTesting/AppEntityDefinition/entities(matching:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents Testing",
      "AppIntentsTesting"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting0A16EntityDefinitionV8entities8matchingSayAA03AnyaD0VGSS_tYaKF"
  },
  "title" : "entities(matching:)"
}
-->

# entities(matching:)

Finds app entities that match a given string query.

```
func entities(matching string: String) async throws -> [AnyAppEntity]
```

## Parameters

`string`

The search string to match against entity properties.

## Return Value

An array of entities that match the search criteria.

## Discussion> Throws: Any errors encountered during the query execution.

---

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)