Usage
yt_search(term = NULL, max_results = 50, channel_id = NULL,
channel_type = NULL, type = "video", event_type = NULL,
location = NULL, location_radius = NULL, published_after = NULL,
published_before = NULL, video_definition = "any",
video_caption = "any", video_license = "any", video_syndicated = "any",
video_type = "any", simplify = TRUE, get_all = TRUE,
page_token = NULL, ...)
Arguments
term
Character. Search term; required; no default
max_results
Maximum number of items that should be returned. Integer. Optional. Can be between 0 and 50. Default is 50.
Search results are constrained to a maximum of 500 videos if type is video and we have a value of channel_id
.
channel_id
Character. Only return search results from this channel; Optional.
channel_type
Character. Optional. Takes one of two values: 'any', 'show'
. Default is 'any'
type
Character. Optional. Takes one of three values: 'video', 'channel', 'playlist'
. Default is 'video'
.
event_type
Character. Optional. Takes one of three values: 'completed', 'live', 'upcoming'
location
Character. Optional. Latitude and Longitude within parentheses, e.g. "(37.42307,-122.08427)"
location_radius
Character. Optional. e.g. "1500m", "5km", "10000ft", "0.75mi"
published_after
Character. Optional. RFC 339 Format. For instance, "1970-01-01T00:00:00Z"
published_before
Character. Optional. RFC 339 Format. For instance, "1970-01-01T00:00:00Z"
video_definition
Character. Optional. Takes one of three values: 'any'
(return all videos; Default), 'high', 'standard'
video_caption
Character. Optional. Takes one of three values: 'any'
(return all videos; Default), 'closedCaption', 'none'
. Type must be set to video.
video_license
Character. Optional. Takes one of three values: 'any'
(return all videos; Default), 'creativeCommon'
(return videos with Creative Commons
license), 'youtube'
(return videos with standard YouTube license).
video_syndicated
Character. Optional. Takes one of two values: 'any'
(return all videos; Default), 'true'
(return only syndicated videos)
video_type
Character. Optional. Takes one of three values: 'any'
(return all videos; Default), 'episode'
(return episode of shows), 'movie' (return movies)
simplify
Boolean. Return a data.frame if TRUE
. Default is TRUE
. If TRUE
, it returns a list that carries additional information.
get_all
get all results, iterating through all the results pages. Default is TRUE
. Result is a data.frame
. Optional.
page_token
specific page in the result set that should be returned, optional