Toloka documentation



UserBonusSortItems(self, items=None)

Keys for sorting rewards in search results.

Parameters Description

Parameters Type Description
items Optional[List[SortItem]]

A list of sorting keys. Supported values:

  • 'id' — The ID of a reward.
  • 'created' — The date of granting a reward.


The example shows how to find rewards sorted by granting date in descending order. Rewards with equal granting dates are sorted by IDs in ascending order.

sort = toloka.client.search_requests.UserBonusSortItems(['-created', 'id'])
result = toloka_client.find_user_bonuses(user_id=best_toloker_id, sort=sort, limit=10)