Creating mock api using Query Param

Hi,
Can you tell me how can we create mock api using query parameter?
We need to search into a dataset with respect to a key passed in request, then we need the json as response.

https://mockaroo.com/docs