---
title: CSUserQuery.Responses
framework: corespotlight
role: symbol
role_heading: Structure
path: corespotlight/csuserquery/responses-swift.struct
---

# CSUserQuery.Responses

An asynchronous sequence that contains the results and suggestions for a query string.

## Declaration

```swift
struct Responses
```

## Discussion

Discussion A CSUserQuery/Responses-struct structure contains the results of a query. Fetch this structure from the responses property of your query object to execute the query automatically and begin the delivery of the results. Each element that this structure returns to you is either a search result or a suggested completion of the current search text. Check the element type and handle it accordingly. For more information about how to use this structure, see the responses property.

## Topics

### Getting the response type

- [CSUserQuery.Responses.Response](corespotlight/csuserquery/responses-swift.struct/response.md)

### Iterating over the responses

- [CSUserQuery.Responses.Iterator](corespotlight/csuserquery/responses-swift.struct/iterator.md)

## Relationships

### Conforms To

- [AsyncSequence](swift/asyncsequence.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Executing the query automatically

- [responses](corespotlight/csuserquery/responses-swift.property.md)
- [suggestions](corespotlight/csuserquery/suggestions-swift.property.md)
- [CSUserQuery.Suggestions](corespotlight/csuserquery/suggestions-swift.struct.md)
- [CSUserQuery.Item](corespotlight/csuserquery/item.md)
- [CSUserQuery.Suggestion](corespotlight/csuserquery/suggestion.md)
