<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/FileSource/maximumResultCount",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "FoundationModels"
    ],
    "preciseIdentifier" : "s:31_CoreSpotlight_FoundationModels10FileSourceV18maximumResultCountSiSgvp"
  },
  "title" : "maximumResultCount"
}
-->

# maximumResultCount

The maximum number of results to retrieve from this source.

```
var maximumResultCount: Int?
```

## Discussion

Use this property to limit the number of results the Spotlight search tool returns to the model.
If you specify `nil`, the tool returns all results that match the model’s query. This maximum
applies only to the current source, and doesn’t include results from other sources, which have
their own maximum values. The default value of this property is `nil`.

---

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)