View source: R/get_video_details.R
get_video_details | R Documentation |
Get details such as when the video was published, the title, description, thumbnails, category etc.
get_video_details(
video_id = NULL,
part = "snippet",
as.data.frame = FALSE,
...
)
video_id |
Comma separated list of IDs of the videos for which details are requested. Required. |
part |
Comma-separated vector of video resource properties requested.
Options include:
|
as.data.frame |
Logical, returns the requested information as data.frame.
Does not work for:
|
... |
Additional arguments passed to |
list. If part is snippet, the list will have the following elements:
id
(video id that was passed), publishedAt, channelId,
title, description, thumbnails,
channelTitle, categoryId, liveBroadcastContent, localized,
defaultAudioLanguage
https://developers.google.com/youtube/v3/docs/videos/list
## Not run:
# Set API token via yt_oauth() first
get_video_details(video_id = "yJXTXN4xrI8")
get_video_details(video_id = "yJXTXN4xrI8", part = "contentDetails")
# retrieve multiple parameters
get_video_details(video_id = "yJXTXN4xrI8", part = c("contentDetails", "status"))
# get details for multiple videos as data frame
get_video_details(video_id = c("LDZX4ooRsWs", "yJXTXN4xrI8"), as.data.frame = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.