This is a five example with google script using Youtube API.
You can see my last tutorials about learning with Google Apps Script to add and use a script.
The example is very simple, just see the source code:
1 2 3 4 5 6 7 8 | function YT_Details() { var ytsheet = SpreadsheetApp.getActiveSheet(); var ytvideo = ytsheet.getRange("A2").getValue(); var data = YouTube.Videos.list('snippet, statistics',{id: ytvideo}); var item = data.items[0]; var info = [item.snippet.title,item.snippet.tags,item.statistics.viewCount]; ytsheet.getRange("B2:D2").setValues([info]); } |
The SpreadsheetApp take an active sheet from your document.
The content of the A2 cell is got by getValue function.
The sheet has this type of content:
video title tag count
3A2aQMX8-Bo Blender 2.78a – part 002 – addons 3D 134