Learn R Programming

⚠️There's a newer version (1.0.1) of this package.Take me there.

:sweet_potato: tuber: Access YouTube API via R

Access YouTube API via R. Get comments posted on YouTube videos, information on how many times a video has been liked, search for videos with particular content, and much more. You can also scrape captions from a few videos. To learn more about the YouTube API, see https://developers.google.com/youtube/v3/.

Installation

To get the current development version from GitHub:

# install.packages("devtools")
devtools::install_github("soodoku/tuber", build_vignettes = TRUE)

To get a quick overview of some important functions in tuber, see the vignette:

vignette("tuber-ex", package="tuber")

Using tuber

To get going, get the application id and password from Google Developer Console (see https://developers.google.com/youtube/v3/getting-started). Enable all the YouTube APIs. Also enable Freebase API. Then set the application id and password via the yt_oauth function. For more information about YouTube OAuth, see YouTube OAuth Guide.

yt_oauth("app_id", "app_password")

Get Statistics of a Video

get_stats(video_id="N708P-A45D0")

Get Information About a Video

get_video_details(video_id="N708P-A45D0")

Get Captions of a Video

get_captions(video_id="yJXTXN4xrI8")

Search Videos

yt_search("Barack Obama")

Get Comments

get_comment_threads(filter=c(video_id="N708P-A45D0"))

License

Scripts are released under the MIT License.

Contributor Code of Conduct

The project welcomes contributions from everyone! In fact, it depends on it. To maintain this welcoming atmosphere, and to collaborate in a fun and productive way, we expect contributors to the project to abide by the Contributor Code of Conduct.

Copy Link

Version

Install

install.packages('tuber')

Monthly Downloads

897

Version

0.8.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Gaurav Sood

Last Published

April 11th, 2017

Functions in tuber (0.8.0)

get_related_videos

Get Related Videos
get_stats

Get statistics of a Video
list_channel_activities

List Channel Activity
list_channel_resources

Returns List of Requested Channel Resources
list_regions

List Content Regions That Youtube Currently Supports
list_videocats

List of Categories That Can be Associated with Videos
tuber_GET

Base POST AND GET functions. Not exported.
tuber_POST

POST
get_captions

Get Captions of a Video
get_channel_stats

Get statistics of a Channel
list_guidecats

Get list of categories that can be associated with YouTube channels
list_langs

List Languages That Youtube Currently Supports
get_playlist_items

Get Playlist Items
get_playlists

Get Playlists
list_channel_sections

List Channel Sections
list_channel_videos

Returns List of Requested Channel Videos
list_videos

List (Most Popular) Videos
tuber_check

Request Response Verification
yt_check_token

Check if authentication token is in options
get_subscriptions

Get Subscriptions
get_video_details

Get Details of a Video or Videos
list_abuse_report_reasons

List reasons that can be used to report abusive videos
list_caption_tracks

Get Captions of a Video
yt_oauth

Set up Authorization
yt_search

Search YouTube
tuber

tuber
get_comment_threads

Get Comments Threads
get_comments

Get Comments
yt_topic_search

Search YouTube by Topic