---
title: fetchLimit
framework: swiftdata
role: symbol
role_heading: Instance Property
path: swiftdata/fetchdescriptor/fetchlimit
---

# fetchLimit

The maximum number of models the fetch can return.

## Declaration

```swift
var fetchLimit: Int?
```

## Discussion

Discussion important: Use nil to tell the fetch to return all models of the associated type, not 0. The default value is nil.

## See Also

### Constraining the fetch

- [predicate](swiftdata/fetchdescriptor/predicate.md)
- [sortBy](swiftdata/fetchdescriptor/sortby.md)
- [fetchOffset](swiftdata/fetchdescriptor/fetchoffset.md)
- [includePendingChanges](swiftdata/fetchdescriptor/includependingchanges.md)
