How to get aggregated data of responses from API?