Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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