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

# INSearchForPhotosIntentResponse

Your app’s response to a search for photos intent.

```
class INSearchForPhotosIntentResponse
```

## Overview

Use an [`INSearchForPhotosIntentResponse`](/documentation/Intents/INSearchForPhotosIntentResponse) object to specify the results of searching the user’s photos. After performing a search using the criteria specified in the [`INSearchForPhotosIntent`](/documentation/Intents/INSearchForPhotosIntent) object, create an instance of this class with the results of that search. Siri communicates the status from your response to the user at appropriate times.

You create an [`INSearchForPhotosIntentResponse`](/documentation/Intents/INSearchForPhotosIntentResponse) object in the [`confirm(intent:completion:)`](/documentation/Intents/INSearchForPhotosIntentHandling/confirm(intent:completion:)) and [`handle(intent:completion:)`](/documentation/Intents/INSearchForPhotosIntentHandling/handle(intent:completion:)) methods of your search for photos handler object. For more information about implementing your handler object, see [`INSearchForPhotosIntentHandling`](/documentation/Intents/INSearchForPhotosIntentHandling).

## Topics

### Initializing the Response Object

[`init(code:userActivity:)`](/documentation/Intents/INSearchForPhotosIntentResponse/init(code:userActivity:))

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

### Getting the Response Code

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

The code indicating whether you successfully handled the intent.

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

Constants indicating the status of the response.

### Accessing the Response Details

[`searchResultsCount`](/documentation/Intents/INSearchForPhotosIntentResponse/searchResultsCount-82lnb)

The number of photos that match the search parameters.

[`searchResultsCount`](/documentation/Intents/INSearchForPhotosIntentResponse/searchResultsCount-3i5mz)

The number of photos that match the search parameters.



---

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)