Add sort_value to trends and new endpoints