---
title: limit
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkdocumentquery/limit
---

# limit

The maximum number of documents the receiver will return upon completion.

## Declaration

```swift
var limit: Int { get }
```

## Discussion

Discussion This property contains the value passed to the init(documentType:predicate:limit:sortDescriptors:includeDocumentData:resultsHandler:) method’s limit parameter.

## See Also

### Accessing the Document Query’s Properties

- [includeDocumentData](healthkit/hkdocumentquery/includedocumentdata.md)
- [sortDescriptors](healthkit/hkdocumentquery/sortdescriptors.md)
