This can either be done via extension of Api.search() or introduction of a separate wrapper around it.