Pagination
When searching for events using the /marketplace/v1/events/search endpoint, results are paginated to help you efficiently navigate large datasets.
Query Parameters
You can control pagination using the following query parameters:
pageSize(number): The maximum number of results to return per page. Default is 20.searchAfter(string): A cursor token to fetch the next page of results.searchBefore(string): A cursor token to fetch the previous page of results.skip(number): The number of results to skip (optional, for advanced use).
Example Request
curl "https://api.letsdothis.com/marketplace/v1/events/search?query=triathlon&pageSize=2" \
-H "Authorization: Bearer {your_api_key}"
Response Structure
The response includes a page object with pagination information:
{
"page": {
"totalResults": 42,
"first": "COGdCBUKccJAIg5aDGdJiDygE94pbSc6qQ==",
"last": "CIqRBhV04LVAIg5aDGcWQp/etbjw6MHqxw=="
}
}
totalResults: The total number of results available for the query.first: The token for the first result in the current page of results.last: The token for the last result in the current page of results.
How to Paginate
- Make your initial request with your desired
pageSizeand any search filters. - To fetch the next page, use the
lastcursor from the response as thesearchAfterparameter in your next request. - To fetch the previous page, use the
firstcursor as thesearchBeforeparameter. - Continue paginating using these cursors as needed.