Skip to content
Get started
Overview

Pagination

The Luminary API uses cursor-based pagination for all list endpoints. This approach provides consistent, reliable pagination even when data is being added or removed between requests.

All paginated endpoints accept the following optional query parameters:

ParameterTypeDescriptionDefault
limitintegerMaximum number of items to return (1-1000)50
afterstringCursor for forward pagination. Returns items after this cursor.
beforestringCursor for backward pagination. Returns items before this cursor.

Example:

Terminal window
curl -X GET "https://your-subdomain.withluminary.com/api/public/v1/households?limit=25&after=eyJpZCI6Imhv..." -H "Authorization: Bearer $ACCESS_TOKEN"

Every paginated response includes:

{
"data": [...],
"page_info": {
"has_next_page": true,
"has_previous_page": true,
"start_cursor": "eyJpZCI6Imhv...",
"end_cursor": "eyJpZCI6Imhv..."
},
"total_count": 150
}
FieldTypeDescription
has_next_pagebooleanIndicates if more items exist after the current page
has_previous_pagebooleanIndicates if more items exist before the current page
start_cursorstringCursor pointing to the first item in the current page
end_cursorstringCursor pointing to the last item in the current page

To paginate forward through a list:

  1. Make an initial request without any cursor
  2. Check if has_next_page is true
  3. Use the end_cursor value as the after parameter in your next request
  4. Repeat until has_next_page is false