Youtube Get Video Stats
youtube_get_video_statsFetch view, like, and comment counts for one or up to 50 YouTube videos in a single call, returning successful results and failed IDs for partial batches.
Instructions
Get view, like and comment counts for up to 50 videos in one call.
Accepts one ID or a list. Uses videos:batchGetStats, which has its own
10,000-call/day bucket — this does not consume the shared pool that youtube_get_video
draws on, so it is the cheap way to get numbers. Results are cached for ~3600
seconds (the server's CACHE_TTL_SECONDS; default 3600), or cached forever when that
setting is 0 — there, 0 means never expires, not "zero seconds" — so re-reading the same
videos costs no quota at all (cached: true only when every requested video's value came
from the cache; false otherwise).
A batch is not atomic: IDs that do not exist or are not publicly visible come back as
failed_video_ids, with the successful ones still returned. Surface both — this is
partial success, not an error. Counts are as of the last call: view_count moves,
like_count and comment_count too. dislike_count does not exist and is not
returned by any YouTube endpoint — YouTube made dislikes private in December 2021, so
there is no way to obtain them; do not attempt a workaround.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| video_ids | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | ||
| cached | No | ||
| failed_video_ids | No | ||
| requested_video_count | No | ||
| succeeded_video_count | No |