API to return users' queries