File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // TITLE: Search by topic
2- // DESCRIPTION: use_function_comment
3- // API_METHOD: youtube.search.list
4- /**
5- * This function searches for videos that are associated with a particular Freebase
6- * topic, logging their video IDs and titles to the Apps Script log. This example uses
7- * the topic ID for Google Apps Script.
8- *
9- * Note that this sample limits the results to 25. To return more results, pass
10- * additional parameters as documented here:
11- * https://developers.google.com/youtube/v3/docs/search/list
12- */
13- function searchByTopic ( ) {
14- var mid = '/m/0gjf126' ;
15- var results = YouTube . Search . list ( 'id,snippet' , { topicId : mid , maxResults : 25 } ) ;
16-
17- for ( var i in results . items ) {
18- var item = results . items [ i ] ;
19- Logger . log ( '[%s] Title: %s' , item . id . videoId , item . snippet . title ) ;
20- }
21- }
22-
231// TITLE: Search by keyword
242// DESCRIPTION: use_function_comment
253// API_METHOD: youtube.search.list
You can’t perform that action at this time.
0 commit comments