
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.OAuth2
clientId: "{{ secret('YOUTUBE_CLIENT_ID') }}"
clientSecret: "{{ secret('YOUTUBE_CLIENT_SECRET') }}"
refreshToken: "{{ secret('YOUTUBE_REFRESH_TOKEN') }}"
- id: get_stats
type: io.kestra.plugin.youtube.VideoStats
accessToken: "{{ outputs.authenticate.accessToken }}"
videoIds:
- "dQw4w9WgXcQ"
- "9bZkp7q19f0"
includeSnippet: true
Properties
accessToken *string
Access token
OAuth2 bearer token used for YouTube Data API calls
videoIds *array
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
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150includeContentDetails 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.
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