Add ref search to api