<!--
{
  "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/CSSearchQuery/results-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "CoreSpotlight"
    ],
    "preciseIdentifier" : "s:So13CSSearchQueryC13CoreSpotlightE7resultsAbCE7ResultsVvp"
  },
  "title" : "results"
}
-->

# results

The results that match the current query string.

```
var results: CSSearchQuery.Results { get }
```

## Discussion

Getting the value of this property starts the query automatically and
begins the delivery of results. Typically, you get this property as
part of a `for..in` loop and iterate over the responses, as shown in
the following example:

```swift
var results: [String] = []
let query = CSSearchQuery(queryString: searchText, queryContext: queryContext)

for try await element in query.results {
    if let title = element.item.attributeSet.title {
    results.append(title)
    }
}
```

---

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)