<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INSearchForMediaIntentResponse",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INSearchForMediaIntentResponse"
  },
  "title" : "INSearchForMediaIntentResponse"
}
-->

# INSearchForMediaIntentResponse

An intents handler’s response to a search media intent.

```
class INSearchForMediaIntentResponse
```

## Overview

Use an [`INSearchForMediaIntentResponse`](/documentation/Intents/INSearchForMediaIntentResponse) object to specify the results after searching for the user-specified media. After performing the search action using the criteria specified in the [`INSearchForMediaIntent`](/documentation/Intents/INSearchForMediaIntent) object, create an instance of this class with the results of the action. Siri communicates the status from your response to the user, at appropriate times.

You create an [`INSearchForMediaIntentResponse`](/documentation/Intents/INSearchForMediaIntentResponse) object in the [`confirm(intent:completion:)`](/documentation/Intents/INSearchForMediaIntentHandling/confirm(intent:completion:)) and [`handle(intent:completion:)`](/documentation/Intents/INSearchForMediaIntentHandling/handle(intent:completion:)) methods of your add media handler object. For more information about implementing your handler object, see [`INSearchForMediaIntentHandling`](/documentation/Intents/INSearchForMediaIntentHandling).

## Topics

### Initializing the Response Object

[`-  initWithCode:userActivity:`](/documentation/Intents/INSearchForMediaIntentResponse/init(code:userActivity:))

Initializes the response object with the specified code and user activity object.

### Providing the Response Code

[`code`](/documentation/Intents/INSearchForMediaIntentResponse/code)

A response code that indicates whether the app successfully searched for the media.

[`INSearchForMediaIntentResponseCode`](/documentation/Intents/INSearchForMediaIntentResponseCode)

Codes returned by an intents handler in response to a search request.

### Accessing the Media Item

[`mediaItems`](/documentation/Intents/INSearchForMediaIntentResponse/mediaItems)

The media items that were found by the search.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCopying`](/documentation/Foundation/NSCopying)

### Inherits From

[`INIntentResponse`](/documentation/Intents/INIntentResponse)

---

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)