I have a google sheet setup for pulling YouTube API information like duration, title, etc. However I'm struggling to get the function working for the video date.
does anyone have any advice?
function getYoutubeDate(videoId){ var url = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails&id=" + videoId; url = url + key; var videoListResponse = UrlFetchApp.fetch(url); var json = JSON.parse(videoListResponse.getContentText()); return json["items"][0]["snippet"]["publishedAt"];}