Analyzes trending videos and content for specific search terms or topics.
Usage
analyze_trends(
search_terms,
max_results = 50,
time_period = "month",
order = "viewCount",
region_code = NULL,
auth = "key",
...
)Arguments
- search_terms
Vector of search terms to analyze
- max_results
Maximum results per search term (default: 50)
- time_period
Time period for analysis: "week", "month", "year", "all"
- order
Sort order: "relevance", "date", "rating", "viewCount"
- region_code
Region code for localized trends
- auth
Authentication method: "token" (OAuth2) or "key" (API key)
- ...
Additional arguments passed to search functions
Examples
if (FALSE) { # \dontrun{
# Analyze trending topics
trends <- analyze_trends(c("machine learning", "AI", "data science"))
# Regional trending analysis
trends_us <- analyze_trends("music", region_code = "US", time_period = "week")
} # }