Learn R Programming

tuber (version 0.9.7)

get_related_videos: Get Related Videos

Description

Takes a video id and returns related videos

Usage

get_related_videos(video_id = NULL, max_results = 50,
  safe_search = "none", ...)

Arguments

video_id

Character. Required. No default.

max_results

Maximum number of items that should be returned. Integer. Optional. Can be between 0 and 50. Default is 50.

safe_search

Character. Optional. Takes one of three values: 'moderate', 'none' (default) or 'strict'

Additional arguments passed to tuber_GET.

Value

data.frame with 16 columns: video_id, rel_video_id, publishedAt, channelId, title, description, thumbnails.default.url, thumbnails.default.width, thumbnails.default.height, thumbnails.medium.url, thumbnails.medium.width, thumbnails.medium.height, thumbnails.high.url, thumbnails.high.width, thumbnails.high.height, channelTitle, liveBroadcastContent

References

https://developers.google.com/youtube/v3/docs/search/list

Examples

Run this code
# NOT RUN {
# Set API token via yt_oauth() first

get_related_videos(video_id = "yJXTXN4xrI8")
# }

Run the code above in your browser using DataLab