Refactored api params validation and added search string