---
title: "Cap the page size · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/lists/page-size-limit
updated: 2026-10-20
licence: "All rights reserved"
---

# Cap the page size

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Lists](https://agentwranglers.se/playbook/api-design/lists)
- Rule: Set a default page size and a maximum. Clamp or reject anything above the maximum.
- How: Document both numbers in the contract, for example 50 by default and 200 at most, as `default` and `maximum` on the `limit` parameter. This also protects the server, as in [resource limits](https://agentwranglers.se/playbook/adversarial-testing/abuse-and-limits/resource-limits).
- Check: Request `?limit=100000`. The answer holds at most the maximum, or a 400 problem names the limit.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/lists/page-size-limit`.

- Previous: [Page lists with cursors](https://agentwranglers.se/playbook/api-design/lists/cursor-pagination)
- Next: [Filter with plain parameters](https://agentwranglers.se/playbook/api-design/lists/filtering)
- [Lists](https://agentwranglers.se/playbook/api-design/lists)
