---
title: INSearchForMediaIntentResponse
framework: intents
role: symbol
role_heading: Class
path: intents/insearchformediaintentresponse
---

# INSearchForMediaIntentResponse

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

## Declaration

```swift
class INSearchForMediaIntentResponse
```

## Overview

Overview Use an 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 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 object in the confirm(intent:completion:) and handle(intent:completion:) methods of your add media handler object. For more information about implementing your handler object, see INSearchForMediaIntentHandling.

## Topics

### Initializing the Response Object

- [init(code:userActivity:)](intents/insearchformediaintentresponse/init(code:useractivity:).md)

### Providing the Response Code

- [code](intents/insearchformediaintentresponse/code.md)
- [INSearchForMediaIntentResponseCode](intents/insearchformediaintentresponsecode.md)

### Accessing the Media Item

- [mediaItems](intents/insearchformediaintentresponse/mediaitems.md)

## Relationships

### Inherits From

- [INIntentResponse](intents/inintentresponse.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Search for Media

- [INSearchForMediaIntentHandling](intents/insearchformediaintenthandling.md)
- [INSearchForMediaIntent](intents/insearchformediaintent.md)
