Documentation Index
Fetch the complete documentation index at: https://docs.lilury.com/llms.txt
Use this file to discover all available pages before exploring further.
Pagination
All list endpoints in the Lilury API use cursor-based pagination. Instead of asking for page 3 of some fixed offset, you pass back the cursor the API gave you to continue from where you left off.Why cursor pagination
Offset-based pagination (?page=3&limit=20) has a known flaw: if items are inserted or deleted between requests, you can see the same item twice or skip one entirely. Cursors encode your exact position in the sorted result set, so the next page always starts at the right item regardless of concurrent writes.
Request parameters
Every list endpoint accepts the following query parameters:| Parameter | Type | Default | Description |
|---|---|---|---|
page | string | (none) | Cursor returned by the previous response. Omit to start from the beginning. |
pageSize | integer | 20 | Number of results per page. Min 1, max 100. |
orderBy | string | endpoint-specific | Field name to sort by. |
orderAsc | boolean | false | true for ascending, false for descending. |
keyword | string | (none) | Free-text search term. Max 50 characters. |
Response shape
Every paginated endpoint returns this envelope:| Field | Description |
|---|---|
currentPage | The cursor that was used to produce this page (mirrors the page you sent, or null for the first page). |
results | Array of items for this page. May be empty. |
nextPage | Cursor to pass as page on the next request. null when there are no more results. |
nextPage is null, you have reached the end of the result set.
Walking through pages
First request
Omit thepage parameter entirely:
Subsequent requests
Pass thenextPage value back as page:
nextPage is null.
Full iteration — JavaScript
Full iteration — Python
Sorting
UseorderBy and orderAsc to control the sort order. The available field names are listed in each endpoint’s reference. Sort parameters must stay the same across all pages of the same request sequence — changing them mid-sequence produces undefined results.
Cursors are opaque
Thepage and nextPage values are opaque strings. They encode your position in the result set in a format the API understands. Do not parse, construct, or modify them. Treat them as a black box that you store and send back unchanged.
Page size guidance
The default page size is20. The maximum is 100.
For interactive UIs, a page size of 20–50 is usually right — small enough to be fast, large enough to avoid too many round trips.
For bulk exports or data processing, use 100 and iterate through all pages in a loop. This minimizes the number of HTTP requests while staying within the limit.
There is no benefit to requesting fewer items than you need in a single page. One request for 100 items is always faster than five requests for 20 items.
