<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/VNRecognizedTextObservation/topCandidates(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "c:objc(cs)VNRecognizedTextObservation(im)topCandidates:"
  },
  "title" : "topCandidates(_:)"
}
-->

# topCandidates(_:)

Requests the *n* top candidates for a recognized text string.

```
func topCandidates(_ maxCandidateCount: Int) -> [VNRecognizedText]
```

## Parameters

`maxCandidateCount`

The maximum number of candidates to return. This can’t exceed 10.

## Return Value

An array of the *n* top candidates, sorted by decreasing confidence score.

## Discussion

This function returns no more than *n* candidates, but it may return fewer than *n* candidates.

---

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)