Hot to retrieve top 5 or last 5 searches for an user?

I’m trying to get top searches or last searches for based on a userToken.
Is there a possible way how I can get this data from Algolia?
If I get the data Im planning to use that in personalisation.


Thanks for the reply.
Could you send me any links to the Algolia documentation around this.