YouTube Subs
A YouTube subscriber count widget displays the official subscriber count, total view count, and video count for any YouTube channel. WidgetCraft's YouTube Subs widget uses the YouTube Data API v3 via our hosted proxy — no API key required — shows a subscriber-delta pill between polls, and embeds in Notion, Obsidian, OBS, or any iframe-capable website.
WidgetCraft's YouTube Subs widget is a clean, embeddable channel stat display for creators who want to keep their growth metrics visible inside their workspace. Supply a channel ID (`?channel=UCxxxxxx`) or handle (`?handle=@mkbhd`) — that's it. The widget calls our hosted proxy at `/api/proxy/youtube`, which uses the operator-side YOUTUBE_API_KEY and caches responses for 5 minutes. No personal API key, no Google Cloud setup. Subscriber count is displayed as the hero stat with a formatted number (e.g. 1.4M); total views and video count appear in smaller chips below in the full layout. Between polls, the widget compares the latest subscriber count to the cached value in localStorage and shows a green +N delta pill if the channel gained subscribers. YouTube's API rounds subscriber counts down to 3 significant figures for channels over 1,000 (so 98,732 shows as 98,700) — the widget notes this with a small 'Official count — rounded by YouTube' disclaimer. Advanced users running a self-hosted deploy without the env var can still pass `?key=AIza...` to call the YouTube API directly from the browser.
Questions, answered.
Do I need my own YouTube API key?
No. The widget calls our hosted proxy at `/api/proxy/youtube` by default, which uses a shared server-side API key. Just point the widget at a channel with `?handle=@name` or `?channel=UC...` and it works. If you're self-hosting the code without a YOUTUBE_API_KEY env var, you can pass `?key=AIza...` in the URL to call the API directly.
Do I need to connect my YouTube account?
No — subscriber counts are public data on YouTube (anyone browsing the channel sees the same number), so no account linking or OAuth is required. A separate widget for private channel analytics (revenue, watch-time retention, audience demographics) is planned for a later sprint.
How do I find a channel's ID?
The easiest way is to use the channel handle. Add `?handle=@channelname` to the URL — the widget resolves the handle to a channel ID automatically. Alternatively, a channel's ID (starting with UC) appears in the channel URL on YouTube.
How often does the subscriber count refresh?
Every 2 minutes by default. You can change this with `?refresh=N` in the URL. Note that YouTube itself only updates the published subscriber count periodically, so rapid polling won't yield more real-time data. The proxy also caches for 5 minutes, so multiple widgets pointed at the same channel share the same response.
Why is the subscriber count slightly off from what I see on YouTube?
YouTube's API rounds subscriber counts down to 3 significant figures for channels with more than 1,000 subscribers — 98,732 becomes 98,700 in the API response. This is a YouTube platform decision. The widget displays the exact value the API returns and notes the rounding.
Can I track any public channel?
Yes, any channel that hasn't hidden its subscriber count. Some channels choose to hide their subscriber count — when they do, the widget displays 'Subscriber count hidden' instead of a number.
What is the delta pill next to the subscriber count?
Between polls the widget compares the current subscriber count to the value cached locally on the previous load. A green +N pill appears if the channel gained subscribers since the last check. The delta is omitted if the count hasn't changed.