Connects /search/ function from API to front-end