Learn R Programming

tuber (version 2.0.0)

get_all_comments: Get All Video Comments, Including Replies

Description

Retrieves top-level comments and, when a thread response contains only a reply preview, follows `comments.list` pagination to retrieve the remaining replies.

Usage

get_all_comments(video_id, max_results = NULL, auth = "key", ...)

Value

A data frame with one row per top-level comment or reply and snake-case column names.

Arguments

video_id

Video ID.

max_results

Optional maximum total number of comments and replies. `NULL` retrieves all available comments.

auth

Authentication method, `"key"` or `"token"`.

...

Additional arguments passed to [tuber_GET()].

References

https://developers.google.com/youtube/v3/docs/commentThreads/list https://developers.google.com/youtube/v3/docs/comments/list

Examples

Run this code
if (FALSE) {
get_all_comments("a-UQz7fqR3w", max_results = 100)
}

Run the code above in your browser using DataLab