---
title: "init(title:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/insearchfornotebookitemsintent/init(title:content:itemtype:status:location:locationsearchtype:datetime:datesearchtype:)"
---

# init(title:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:)

Initializes the intent object with the specified search parameters.

## Declaration

```swift
convenience init(title: INSpeakableString?, content: String?, itemType: INNotebookItemType, status: INTaskStatus, location: CLPlacemark?, locationSearchType: INLocationSearchType, dateTime: INDateComponentsRange?, dateSearchType: INDateSearchType)
```

## Parameters

- `title`: The text to search for in the title of the note, task, or task list.
- `content`: The text to search for in the content of a note.
- `itemType`: The type of items to search. Use this parameter to restrict your search to items of the specified type.
- `status`: The completion status of the task. Use this parameter to restrict your search to tasks whose status matches the specified value.
- `location`: The location value to use during your search. When the locationSearchType parameter is doc://com.apple.sirikit/documentation/Intents/INLocationSearchType/byLocationTrigger, use this parameter to restrict your search to reminders that are triggered near the specified location.
- `locationSearchType`: The type of location search to perform. Use this parameter to specify when a search for location-based reminders should occur.
- `dateTime`: The time value to use during your search. Use the value of the dateSearchType parameter to determine how to apply the value of this parameter.
- `dateSearchType`: The type of date-based search to perform. Use this parameter to specify when to search for notes with the specified creation or modification date or when to search for reminders based on the date on which they are delivered.

## Return Value

Return Value An initialized intent object or nil if the object could not be created.

## Discussion

Discussion Normally, you do not create instances of this class yourself. Instead, SiriKit creates instances when the user asks to search for notes, task lists, tasks, or reminders. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths. When doing so, specify only the search parameters that you want to include and provide nil or unknown values for other parameters.

## See Also

### Initializing the Intent Object

- [init(title:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:temporalEventTriggerTypes:taskPriority:notebookItemIdentifier:)](intents/insearchfornotebookitemsintent/init(title:content:itemtype:status:location:locationsearchtype:datetime:datesearchtype:temporaleventtriggertypes:taskpriority:notebookitemidentifier:).md)
- [init(title:content:itemType:status:location:locationSearchType:dateTime:dateSearchType:notebookItemIdentifier:)](intents/insearchfornotebookitemsintent/init(title:content:itemtype:status:location:locationsearchtype:datetime:datesearchtype:notebookitemidentifier:).md)
