fixed error in api for searches