The Moonbase API uses cursor-based pagination for list endpoints that return multiple items. These endpoints return one page of results per API call. Each page contains up to 20 results by default.Documentation Index
Fetch the complete documentation index at: https://docs.moonbase.ai/llms.txt
Use this file to discover all available pages before exploring further.
Response structure
The API returns items in thedata property of the response. Refer to the individual endpoints for the ordering of items since they vary based on the endpoint.
Example: First page (with more results)
next cursor will not be present if there are no more pages to fetch. prev cursor appears when previous pages exist. Enables bidirectional navigation.
Do not pass both before and after in the same request. Cursors are opaque strings—do not parse or modify them—and should be URL-encoded when used in query parameters.
Pagination parameters
Control pagination using these query parameters:limit: (Integer) — Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 if not specified.after: (String) — Returns results starting immediately after the item identified by this cursor. Use thenextcursor from a previous response to fetch the next page.before: (String) — Returns results starting immediately before the item identified by this cursor. Use theprevcursor from a previous response to fetch the previous page.
Cursors do not expire and remain valid indefinitely. Using an invalid cursor will return a 400 Bad Request error.
Navigating pages
Auto-pagination (recommended)
Moonbase SDKs provide methods to automatically iterate through all items across all pages:Single page requests
Request one page at a time:Manual pagination with cURL
Make an initial API call to list items
Check for pagination cursors in the response
- If
meta.cursors.nextis missing, all items have been retrieved - If the
nextcursor is present, use it with theafterparameter to fetch the next page - If the
prevcursor is present, use it with thebeforeparameter to fetch the previous page

