
YouTube VideoStats
CertifiedGet statistics for YouTube videos
YouTube VideoStats
Get statistics for YouTube videos
Retrieve detailed statistics for one or more YouTube videos including views, likes, and comments
type: io.kestra.plugin.youtube.VideoStatsExamples
Get statistics for multiple videos
id: get_video_stats
namespace: company.team
tasks:
- id: authenticate
type: io.kestra.plugin.youtube.auth.OAuth2
clientId: "{{ secret('YOUTUBE_CLIENT_ID') }}"
clientSecret: "{{ secret('YOUTUBE_CLIENT_SECRET') }}"
refreshToken: "{{ secret('YOUTUBE_REFRESH_TOKEN') }}"
- id: get_stats
type: io.kestra.plugin.youtube.task.VideoStats
accessToken: "{{ outputs.authenticate.accessToken }}"
videoIds:
- "dQw4w9WgXcQ"
- "9bZkp7q19f0"
includeSnippet: true
Properties
accessToken *Requiredstring
Access token
OAuth2 bearer token used for YouTube Data API calls
videoIds *Requiredarray
Video IDs
List of YouTube video IDs to retrieve statistics for
applicationName string
kestra-yt-pluginApplication name
Application name sent with YouTube requests; defaults to kestra-yt-plugin
includeContentDetails booleanstring
falseInclude content details
Whether to include channels content details
includeSnippet booleanstring
falseInclude snippet data
Whether to include video snippet data (title, description, thumbnail, etc.) in addition to statistics
maxResults integerstring
5Maximum results per video
Maximum number of items that should be returned in the result set – acceptable values are 1 to 50, inclusive.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
totalComments integer
Total comments across all videos
totalLikes integer
Total likes across all videos
totalVideos integer
Total number of videos processed
totalViews integer
Total views across all videos
videos array
Video statistics data