_CoreSpotlight_FoundationModels · IOS API REFERENCE
SpotlightSearchTool.SearchReply
struct · iOS 27.0+ · SDK 27.1
struct SearchReply
A set of search results with routing metadata for host app consumption.
Members (5)
get · iOS 27.0+
queryToken
TypeScript
get queryToken(): SpotlightSearchTool_SearchReply_QueryToken
Swift declaration
let queryToken: SpotlightSearchTool.SearchReply.QueryToken
An opaque value you use to identify the query that generated the reply.
When processing a request, a model might create multiple queries to find and refine search
results. Use this property to associate replies with a specific query. The token itself is
an opaque value you save and compare against tokens in other search replies. You might use
this value to partition the data you receive.
get · iOS 27.0+
stageToken
TypeScript
get stageToken(): SpotlightSearchTool_SearchReply_StageToken
Swift declaration
let stageToken: SpotlightSearchTool.SearchReply.StageToken
An opaque value you use to identify the pipeline stage that generated the reply.
The Spotlight search tool provides several ways to search content, and implements each technique
as an independent stage. For a given query, a model can run multiple stages to generate the
results of the query. Use this property to associate search reply structures with a specific
stage. The token itself is an opaque value you save and compare against tokens in other
search replies. You might use this value to partition the data you receive.
get · iOS 27.0+
label
TypeScript
get label(): (string) | null
Swift declaration
let label: String?
A short, LLM-generated description of what the result represents.
Use this property to determine what information the model requested. For complex requests,
the tool provides the simplest string that describes the current portion of the task. For
example, the string might contain a value like "Attachments from John" or "Documents about the deadline."
You can display the string in your app’s interface or use it as an accessibility label.
get · iOS 27.0+
status
TypeScript
get status(): SpotlightSearchTool_SearchReply_Status
Swift declaration
let status: SpotlightSearchTool.SearchReply.Status
An indicator of whether the current query is complete or still in progress.
The of this property is ``SpotlightSearchTool/SearchReply/Status/partial`` when the system has
more replies to deliver for the same ``queryToken`` value. When delivering the last reply for
a query, the tool sets this value to ``SpotlightSearchTool/SearchReply/Status/complete``. Use
this value to track changes to the current query. For example, you might choose to partition
data for each query and display them separately in your interface.
get · iOS 27.0+
content
TypeScript
get content(): SpotlightSearchTool_SearchReply_Content
Swift declaration
let content: SpotlightSearchTool.SearchReply.Content
The result content — determines what to display and how.