How to list a YouTube channel's Shorts in Python

Checked on 2026-11-24.

The official YouTube Data API cannot list a channel's Shorts: nothing in its documentation marks a video as a Short. You can get close by filtering a channel's uploads by length and shape, or you can read the channel's Shorts tab, with yt-dlp or with an HTTP API. All three routes are below, with code and with where each one stops.

1. The official API: no Shorts flag

The video resource has no property that says a video is a Short. A channel's relatedPlaylists lists likes, uploads and a deprecated favorites, and no Shorts playlist. In search.list, videoDuration=short means "Only include videos that are less than four minutes long", which is a length filter, not a Shorts filter. The revision history added one Shorts-specific item on 3 November 2026, a shortsAspectRatio thumbnail size, but it is "available for YouTube Shorts that have a custom thumbnail set", so a Short without one looks like any other video.

What YouTube counts as a Short is in its help center: on a standard channel, "Any videos uploaded on or after this date with a square or vertical aspect ratio up to three minutes in length", the date being 15 October 2024. Videos uploaded before that date "will remain the same", so older square or vertical uploads longer than a minute stay long-form videos. Official Artist Channels have the three-minute rule from 8 December 2025.

The documented fields can approximate that rule. The uploads playlist "contains the channel's uploaded videos", and by YouTube's definition a Short is one of them; videos.list returns each video's length in contentDetails.duration. Its shape is harder: fileDetails, which has the aspect ratio, "can only be retrieved by the video owner". What remains is the embed player. When you pass maxWidth, player.embedWidth and player.embedHeight are returned only if "the video's aspect ratio is known", so a player at least as tall as it is wide points to a square or vertical video.

Python
import os
import re
import requests

API = "https://www.googleapis.com/youtube/v3"
key = os.environ["YOUTUBE_API_KEY"]

def seconds(iso):   # contentDetails.duration, such as PT2M41S
    d, h, m, s = re.fullmatch(r"P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?", iso).groups(default="0")
    return ((int(d) * 24 + int(h)) * 60 + int(m)) * 60 + int(s)

channel = requests.get(f"{API}/channels", params={"part": "contentDetails", "forHandle": "@MrBeast", "key": key}, timeout=30).json()
uploads = channel["items"][0]["contentDetails"]["relatedPlaylists"]["uploads"]

# The latest 50 uploads; follow nextPageToken for more
page = requests.get(f"{API}/playlistItems", params={"part": "contentDetails", "playlistId": uploads, "maxResults": 50, "key": key}, timeout=30).json()
ids = ",".join(item["contentDetails"]["videoId"] for item in page["items"])

videos = requests.get(f"{API}/videos", params={"part": "snippet,contentDetails,player", "id": ids, "maxWidth": 360, "key": key}, timeout=30).json()
for video in videos["items"]:
    length = seconds(video["contentDetails"]["duration"])
    limit = 180 if video["snippet"]["publishedAt"] >= "2024-10-15" else 60
    width, height = video["player"].get("embedWidth"), video["player"].get("embedHeight")
    upright = width is not None and height is not None and int(height) >= int(width)
    if length <= limit and upright:
        print(video["id"], length, video["snippet"]["title"])

Each of these calls costs 1 quota unit of the 10,000 a project gets per day, so even a channel with thousands of uploads is cheap to scan.

Where it stops: this is your own inference from documented fields, not an answer from YouTube. Google does not describe the embed size as a way to find Shorts, so check the filter against a few Shorts you know before you rely on it. publishedAt "might be different than the time that the video was uploaded", which can misjudge videos uploaded around the cut-off date, and the dates differ for Official Artist Channels. Tutorials that build a "Shorts playlist" ID out of the channel ID use something the documentation does not list: it may work on the day you try it and change without notice.

2. yt-dlp: the Shorts tab, no key

yt-dlp reads YouTube's own pages. Its README says "Channel URLs download all uploads of the channel, including shorts and live", and its test cases include a channel's Shorts tab by handle, such as https://www.youtube.com/@NotJustBikes/shorts. The README's embedding example, with the option behind --flat-playlist, lists the tab without opening each video:

Python
# pip install yt-dlp
import yt_dlp

with yt_dlp.YoutubeDL({"extract_flat": "in_playlist", "quiet": True}) as ydl:
    info = ydl.extract_info("https://www.youtube.com/@MrBeast/shorts", download=False)

for entry in info["entries"]:
    print(entry["id"], entry.get("view_count"), entry.get("title"))

In this flat mode yt-dlp's source gives each entry its ID, address, title, thumbnails and a view count read from the tab's label, so it is rounded the way the tab shows it. There is no upload date: the README warns that with --flat-playlist "some entry metadata may be missing", and the date needs a full extraction of each Short.

Where it breaks: it depends on pages YouTube does not document, so it needs updates when they change; keep it current (release 2026.11.23 came out the day before this guide was checked). Opening every Short for its details counts against YouTube's limits: yt-dlp's wiki puts the rate limit for guest sessions at "~300 videos/hour (~1000 webpage/player requests per hour)".

3. An HTTP API: the Shorts tab in one request

With Pipefetch one request takes a handle, a channel ID or a channel URL and returns the channel's latest Shorts, newest first.

Python
import os
import requests

res = requests.get(
    "https://pipefetch.com/v1/youtube/channel/shorts",
    params={"channel": "@MrBeast", "limit": 40},
    headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
    timeout=90,
)
if res.status_code == 404:
    print(res.json()["error"]["code"])   # no_shorts or channel_not_found: not charged
else:
    res.raise_for_status()
    data = res.json()["data"]
    print(data["channel"]["name"], data["channel"]["id"])
    for short in data["shorts"]:
        print(short["videoId"], short["viewCount"], short["title"])

Some fields of an answer saved on 18 November 2026:

JSON
{
  "channel": { "id": "UCX6OQ3DkcsbYNE6H8uQQuVA", "name": "MrBeast" },
  "shorts": [
    {
      "videoId": "sHpEqeSByPI",
      "url": "https://www.youtube.com/shorts/sHpEqeSByPI",
      "title": "Unboxing The World’s Largest Toy",
      "viewCount": 22000000,
      "viewCountIsExact": false
    }
  ]
}

A request costs 1 credit for up to 40 Shorts, and there are no further pages. A channel without Shorts answers 404 and costs nothing. The view counts are the rounded ones the Shorts tab displays (22M), and the list has no publish date, likes or length, because the tab does not show them. The reference lists every field.

For exact numbers, pass a Short's link to the video endpoint (1 credit each), or hand the IDs to the official videos.list, which takes a comma-separated list of IDs in one call for 1 quota unit:

Python
ids = ",".join(short["videoId"] for short in data["shorts"])
stats = requests.get(
    "https://www.googleapis.com/youtube/v3/videos",
    params={"part": "snippet,statistics", "id": ids, "key": os.environ["YOUTUBE_API_KEY"]},
    timeout=30,
).json()
for video in stats["items"]:
    print(video["id"], video["snippet"]["publishedAt"], video["statistics"]["viewCount"])

Where it stops: the latest 40 Shorts, not a channel's whole history. It is not an official API, and Pipefetch is not affiliated with YouTube or Google. Most requests take 2 to 9 seconds; when YouTube does not answer you get a 502 that costs nothing and can be retried. A new account has 100 free credits and needs no card.

Which one should you use?

You needUse
Every Short a channel ever uploaded, and you accept an approximationThe official API with the length and shape filter
The Shorts tab as YouTube shows it, on your own computeryt-dlp
The latest Shorts of a handle in one request, from a serverAn HTTP API such as Pipefetch
Exact views, likes and dates of Shorts whose IDs you haveThe official videos.list, or the Pipefetch video endpoint

For a channel's regular uploads, the guide to listing a channel's videos covers the RSS feed and the uploads playlist.

Why Shorts view counts jumped

If you compare Shorts numbers over time, know that YouTube changed how they are counted. From 31 March 2025, in the words of the revision history, "views will count the number of times your Short starts to play or replay, with no minimum watch time requirement", and videos.statistics.viewCount follows that rule. Entries of 27 August and 16 November 2026 extended it to every format: the video resource now says that for long-form videos, Live and Shorts alike, viewCount "counts views the moment a video begins to play" and includes co-views of people watching together on a television screen. A count read before those changes is not comparable with one read after.

Try it with 100 free credits. No card needed. No Google Cloud project or OAuth. Get an API key or read the docs.

Every source

Instagram

Websites

TikTok

Facebook

Google

Threads

LinkedIn

App stores

Steam

X

Pinterest

Airbnb

Real estate

Keywords

Job boards

Eventbrite

Shopify stores

Public tenders

All guides