> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.docs.modulards.com/pagination/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server. # Pagination Every listing is paginated. Choose the page and its size with two query parameters: | Parameter | Default | Allowed | | -------------- | ------- | ----------- | | `page[number]` | `1` | `1` or more | | `page[size]` | `15` | `1` to `50` | A `page[size]` above `50` answers `422` rather than being reduced. ```bash curl "https://api.modulards.com/api/public/v1/sites?page[number]=2&page[size]=50" \ -H "Authorization: Bearer $MODULAR_DS_TOKEN" ``` ## The response A paginated response carries `links` to the neighbouring pages and a `meta` block describing the page: ```json { "data": [ ... ], "links": { "first": "https://api.modulards.com/api/public/v1/sites?page[number]=1&page[size]=50", "last": "https://api.modulards.com/api/public/v1/sites?page[number]=3&page[size]=50", "prev": "https://api.modulards.com/api/public/v1/sites?page[number]=1&page[size]=50", "next": "https://api.modulards.com/api/public/v1/sites?page[number]=3&page[size]=50" }, "meta": { "current_page": 2, "from": 51, "last_page": 3, "path": "https://api.modulards.com/api/public/v1/sites", "per_page": 50, "to": 100, "total": 128 }, "jsonapi": { "version": "1.1" } } ``` `links.prev` is `null` on the first page and `links.next` is `null` on the last one. The links keep your `page[size]`. ## Walking a whole listing Keep every filter, sort and `page[size]` fixed, and follow `links.next` until it is `null`. Equivalently, advance `page[number]` until `meta.current_page` reaches `meta.last_page`. `meta.total` counts the rows of that listing, which is not always a number of websites: a listing of backups counts backups. If you create or delete resources while you walk, rows can shift between pages. Finish reading before you change what the listing selects. > Page through every listing with page[number] and page[size]