<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSUserQuery/foundSuggestionsHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight"
    ],
    "preciseIdentifier" : "c:objc(cs)CSUserQuery(py)foundSuggestionsHandler"
  },
  "title" : "foundSuggestionsHandler"
}
-->

# foundSuggestionsHandler

The block to execute when the query delivers a new batch of suggested items.

```
var foundSuggestionsHandler: (([CSSuggestion]) -> Void)? { get set }
```

## Discussion

Specify a value for this property only if you start your query with the
[`start()`](/documentation/CoreSpotlight/CSUserQuery/start()) method. While the query runs, the query object executes the
provided closure one or more times to deliver suggested completions for
the current search term. Use your handler to retrieve the suggested completions
and update your app’s search interface. The query object stops delivering
suggested items when it runs out of suggestions or reaches the maximum
number found in the [`maxSuggestionCount`](/documentation/CoreSpotlight/CSUserQueryContext/maxSuggestionCount) property
of the query configuration parameters.

If you start the query by accessing the [`responses`](/documentation/CoreSpotlight/CSUserQuery/responses-swift.property)
property, the query object doesn’t execute the block in this property.

---

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)