updating search api to handle new JSON