I think you are looking for SearchFile and SearchFolder from DriveApp. A complete list of options is available in the Google Drive SDK documentation.
I ran several tests and it seemed that I could not do 1 search and get the files and folders to call the search function from the Google Drive API.
, , 2013
function myFunction() {
var searchFor ='title contains "2013"';
var names =[];
var files = DriveApp.searchFiles(searchFor);
while (files.hasNext()) {
var file = files.next();
names.push(file.getName());
}
var folders = DriveApp.searchFolders(searchFor);
while (folders.hasNext()) {
var file = folders.next();
names.push(file.getName());
}
for (var i=0;i<names.length;i++){
Logger.log(names[i]);
}
}