YouTube
Fetch subscriber count, video count, and total views from a YouTube channel.
The YouTube counter follows one YouTube channel and returns its subscriber count, its lifetime views, how many videos it has published, or its name.
Availability: a custom bot, a self-hosted bot or the legacy premium bot. It does not work on the free public bot. A self-hosted bot needs YOUTUBE_API_KEY in its .env; see the configuration reference.

Options
Display
Picks what the counter outputs: Subscribers, Views, Videos or Channel name.
Starts on Subscribers. Does not accept a nested counter.
Channel URL
The channel to look up, written as an @handle or a YouTube address.
Only the shapes below are accepted. It also accepts a nested counter, which must return a valid channel URL.
Accepted Channel URL shapes
http:// or https:// at the front is optional, and so is www. or m..
@handle on its own
By handle. Prefer this shape.
youtube.com/@handle
By handle.
youtube.com/channel/UC...
By channel ID.
youtube.com/user/name
By legacy username.
youtube.com/c/name
By legacy username.
Anything else is refused as invalid, including a bare channel ID, video links, youtu.be links and playlist links. A trailing /videos, /about or ?si=... makes the lookup fail.
What it returns
Display
Value
Subscribers
The subscriber count, as YouTube reports it.
Views
The lifetime view count of the channel.
Videos
How many videos the channel has published.
Channel name
The name of the channel, as text.
Formatting
Subscribers, Views and Videos are numbers, so the Format settings panel applies. Channel name is text and comes back exactly as YouTube spells it. See Formatting counters.
Refresh and caching
The bot keeps each channel's data for 60 minutes, so a YouTube counter changes once an hour at most. More in How counters update.
Examples
Display = Subscribers, Channel URL = @example, Use compact notation = Yes. A channel with 1,230,000 subscribers shows as 1.2M.
Switch Display to Views on the same channel and it shows the views of every video added together.

Errors
The bot is not a premium version and lacks certain features needed for this counter.
The counter is running on the free public bot. Use the legacy premium bot, a custom bot, or self-host.
The YouTube counter requires a channel URL to be set.
Fill in Channel URL, or check that the nested counter in it returns an address.
The provided YouTube channel URL is invalid.
What you typed is not one of the accepted shapes above.
An accepted address that YouTube cannot resolve fails with a generic error instead. On a self-hosted bot the same happens when YOUTUBE_API_KEY is missing. See Troubleshooting.
Last updated