---
title: searchItems
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmetadataquery/searchitems
---

# searchItems

An array of objects that define the query’s scope.

## Declaration

```swift
var searchItems: [Any]? { get set }
```

## Discussion

Discussion Use this method to scope the metadata query to a collection of existing URLs and/or metadata items. This array contains the NSURL and/or NSMetadataItem items to be searched.

## See Also

### Configuring queries

- [searchScopes](foundation/nsmetadataquery/searchscopes.md)
- [predicate](foundation/nsmetadataquery/predicate.md)
- [sortDescriptors](foundation/nsmetadataquery/sortdescriptors.md)
- [valueListAttributes](foundation/nsmetadataquery/valuelistattributes.md)
- [groupingAttributes](foundation/nsmetadataquery/groupingattributes.md)
- [notificationBatchingInterval](foundation/nsmetadataquery/notificationbatchinginterval.md)
- [delegate](foundation/nsmetadataquery/delegate.md)
