<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMetadataQuery/results",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMetadataQuery(py)results"
  },
  "title" : "results"
}
-->

# results

An array containing the query’s results.

```
var results: [Any] { get }
```

## Discussion

The array is a proxy object that is primarily intended for use with Cocoa bindings. While it is possible to copy the proxy array and receive a “snapshot” of the complete current query results, it is generally not recommended due to performance and memory issues. To access individual result array elements, use the [`resultCount`](/documentation/Foundation/NSMetadataQuery/resultCount) and [`result(at:)`](/documentation/Foundation/NSMetadataQuery/result(at:)) methods.

The array supports [Key-value observing](https://developer.apple.com/library/archive/documentation/General/Conceptual/DevPedia-CocoaCore/KVO.html#//apple_ref/doc/uid/TP40008195-CH16), which can be used to be notified when items are added, removed, or updated in the array of results.

By default, this array contains [`NSMetadataItem`](/documentation/Foundation/NSMetadataItem) objects, each of which represents the metadata associated with a file. However, the query’s delegate can substitute these objects with instances of a different class.

> Important:
> Accessing this property implicitly disables updates, and enables updates again once the resulting array is deallocated.

---

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)