Repaired the Api requests

and added an example of the usage of search request in the default.js