Skip to content

Instantly share code, notes, and snippets.

@ikai
Last active February 9, 2017 04:07
Show Gist options
  • Save ikai/7993934 to your computer and use it in GitHub Desktop.
Save ikai/7993934 to your computer and use it in GitHub Desktop.
Search by keyword sample for the YouTube API for Google Apps Script.
function searchByKeyword() {
var results = YouTube.Search.list("id,snippet",
{q : "google apps script", maxResults: 25});
for(var i in results.items) {
var item = results.items[i];
Logger.log("[%s] Title: %s", item.id.videoId, item.snippet.title);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment