Added a search function to the API