Suggest an editImprove this articleRefine the answer for “What does the $limit stage do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The `$limit` stage restricts how many documents get passed further down the pipeline; it's the analog of `LIMIT` in SQL, e.g. `{ $limit: 10 }` lets through only the first 10 documents. **Key point:** it's used to avoid processing unnecessary data, for paginated output (together with `$skip`), and to optimize the pipeline by reducing the load on later stages.Shown above the full answer for quick recall.Answer (EN)ImageThe `$limit` stage **restricts the number of documents** passed further down the pipeline. It's the analog of `LIMIT` in SQL. ### How this works - receives a stream of documents - lets through only the specified number - filters out the rest ### Example ```js { $limit: 10 } ``` Only the first 10 documents continue down the pipeline. ### Why it's used - to avoid processing unnecessary data - for paginated output (together with `$skip`) - to optimize the pipeline by reducing the load on later stages ### Summary `$limit` is the stage that simply "trims" the stream and passes only the needed number of documents onward.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.