<!--
{
  "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/INSearchForPhotosIntent",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "c:objc(cs)INSearchForPhotosIntent"
  },
  "title" : "INSearchForPhotosIntent"
}
-->

# INSearchForPhotosIntent

A request for the list of photos that match the specified criteria.

```
class INSearchForPhotosIntent
```

## Overview

The system creates an [`INSearchForPhotosIntent`](/documentation/Intents/INSearchForPhotosIntent) object when the user asks to search for photos in an app. The intent object contains the parameters to use during the search, including the possible name of a photo album, the people in the photos, or the location of the photos. Use this intent object to validate the search parameters and to begin the search process. When performing the search, use only the provided parameters and ignore any that have no values.

To handle this intent, the handler object in your Intents extension must adopt the [`INSearchForPhotosIntentHandling`](/documentation/Intents/INSearchForPhotosIntentHandling) protocol. Your handler should confirm the request and create an [`INSearchForPhotosIntentResponse`](/documentation/Intents/INSearchForPhotosIntentResponse) object with the results of the search. For successful searches, Siri offers the user a way to launch your app and see the results.

For a list of other intents in the photos domain, see [`INPhotosDomainHandling`](/documentation/Intents/INPhotosDomainHandling).

### Additional Intent Attributes

The following table lists additional attributes of this intent object:

|Attribute                      |Description |
|-------------------------------|------------|
|Supported by                   |Siri Intents|
|Always requires unlocked device|Yes         |

## Topics

### Creating the Intent Object

[`init(dateCreated:locationCreated:albumName:searchTerms:includedAttributes:excludedAttributes:peopleInPhoto:)`](/documentation/Intents/INSearchForPhotosIntent/init(dateCreated:locationCreated:albumName:searchTerms:includedAttributes:excludedAttributes:peopleInPhoto:))

Initializes a search for photos intent object with the specified search parameters.

### Getting the People in the Photos

[`peopleInPhoto`](/documentation/Intents/INSearchForPhotosIntent/peopleInPhoto)

The people identified in the photos.

[`peopleInPhotoOperator`](/documentation/Intents/INSearchForPhotosIntent/peopleInPhotoOperator)

The operator that defines how to search for people in the photos.

### Getting the Search Terms

[`searchTerms`](/documentation/Intents/INSearchForPhotosIntent/searchTerms)

An array of terms to look for in the photos.

[`searchTermsOperator`](/documentation/Intents/INSearchForPhotosIntent/searchTermsOperator)

The operator that defines how to incorporate the search terms when performing the search.

### Getting the Search Attributes

[`dateCreated`](/documentation/Intents/INSearchForPhotosIntent/dateCreated)

The range of dates during which someone took the pictures.

[`locationCreated`](/documentation/Intents/INSearchForPhotosIntent/locationCreated)

The location where someone took the photos.

[`albumName`](/documentation/Intents/INSearchForPhotosIntent/albumName)

The name of the album that contains the photos.

[`includedAttributes`](/documentation/Intents/INSearchForPhotosIntent/includedAttributes)

The attributes that must be present in the photos.

[`excludedAttributes`](/documentation/Intents/INSearchForPhotosIntent/excludedAttributes)

The attributes that must not be present in the photos.

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

Constants indicating attributes of a photo.



---

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)