YouTube videos.batchGetStats: 1 quota unit to track your Shorts

videos.batchGetStats costs 1 quota unit and returns views, likes and comments for many videos. How to tie the numbers back to the Sume jobs that made them.

5 min readSume
All posts

videos.batchGetStats is a YouTube Data API method added on June 3, 2026 that returns view, like and comment counts for a list of video IDs in one call, at a quota cost of 1 unit. It is how you would measure a batch of Shorts you made with Sume, as long as you keep the link between each YouTube video ID and the Sume job that produced it.

Sume does not read YouTube analytics. All YouTube facts here come from the batchGetStats reference and the revision history, read on 2026-10-02.

What does videos.batchGetStats take and return?

The request is GET https://www.googleapis.com/youtube/v3/videos:batchGetStats with an id list and a part list. The accepted parts are contentDetails, id, snippet and statistics. The page says authentication is required only for non-public videos. It does not state a maximum number of IDs per call, so test your batch size rather than assuming one.

The response holds an items array and a summary. Each item has the id, snippet.publishTime, statistics with viewCount, likeCount and commentCount, and contentDetails with duration and durationMillis. The summary reports requestedVideoCount, succeededVideoCount, failedVideoCount and failedVideoIds.

How does it fit the quota model?

The revision history for June 3, 2026 says the method has a quota cost of 1 unit, sits in its own bucket, and defaults to 10,000 units a day. The quota page we read does not mention the method, so rely on the method reference and the revision history for it.

The same quota page says a project starts with 100 search.list calls, 100 videos.insert calls, and 10,000 units for all other endpoints each day, with quotas resetting at midnight Pacific Time.

YouTube Data API quota facts (read 2026-10-02)
ItemDefault or costSource page
videos.insert100 calls per day, 1 unit each, own bucketQuota page
search.list100 calls per day, 1 unit each, own bucketQuota page
Other endpoints10,000 units per day combinedQuota page
videos.batchGetStats1 unit per callMethod reference and revision history

How do I connect a view count to the Sume job that made the video?

Keep one row per upload: the Sume request_id or Format run id, the YouTube video ID, and the date. A Format bulk run returns a queue receipt and child runs you can read back, and a job from Jobs and results keeps its id after it finishes.

With that table, a batchGetStats response becomes a comparison between recipes, hooks or voices instead of a pile of numbers. Sume stores nothing about the YouTube side; the join is yours.

What should I record per Short to make the numbers useful?

A useful table for a batch has a few columns, all of which you control. Record the Sume job or run id, the recipe or Format used, the hook line, the upload date, the YouTube video ID, and the length in seconds. When the response returns contentDetails.durationMillis, you can also confirm that the length you rendered is the length that was uploaded.

Compare like with like. A Short that is two days old and one that is two weeks old are not comparable, and the response gives you snippet.publishTime to normalise by age. Sume does not store any of the YouTube side, so keep this table in your own database or sheet.

Show me the call.

This Python reads the summary and flags IDs YouTube could not return. It needs an OAuth token in YT_TOKEN.

import json, os, urllib.parse, urllib.request

def stats(ids):
    q = urllib.parse.urlencode({"id": ",".join(ids), "part": "statistics,snippet"})
    req = urllib.request.Request(
        "https://www.googleapis.com/youtube/v3/videos:batchGetStats?" + q,
        headers={"Authorization": "Bearer " + os.environ["YT_TOKEN"]},
    )
    with urllib.request.urlopen(req, timeout=30) as resp:
        return json.load(resp)

if __name__ == "__main__":
    data = stats(["VIDEO_ID_1", "VIDEO_ID_2"])
    print(data.get("summary", {}).get("failedVideoIds", []))
    for item in data.get("items", []):
        print(item["id"], item["statistics"].get("viewCount"))

What does it not tell me?

The method returns counts, not why a Short worked. On August 27, 2026, the revision history also says YouTube aligned public view counting across formats so a view counts when a video begins to play, while engagement-based metrics for monetization are unchanged. Read the number with that definition in mind, and see how YouTube counts Shorts views.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume