Badges for YouTube channels and videos — subscribers, views, likes, comments.
Display live stats for YouTube channels and videos.
| Badge | Endpoint | Description |
|---|---|---|
| Subscribers | /youtube/subscribers/{channelId} | Channel subscriber count |
| Channel Views | /youtube/channel-views/{channelId} | Total channel view count |
| Video Views | /youtube/views/{videoId} | Video view count |
| Video Likes | /youtube/likes/{videoId} | Video like count |
| Video Comments | /youtube/comments/{videoId} | Video comment count |
YouTube channel IDs start with UC and are 24 characters long. You can find yours by going to your YouTube channel page and copying the ID from the URL, or by using the YouTube Channel ID Finder.
Some well-known channel IDs:
UC_x5XG1OV2P6uZZ5FSM9TtwUCsBjURrPoezykLs9EqgamOAUCbRP3c757lWg9M-U7TyEkXAUC29ju8bIPH5as8OGnQzwJyAPath Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/youtube/subscribers/UC_x5XG1OV2P6uZZ5FSM9Ttw.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/youtube/subscribers/UC_x5XG1OV2P6uZZ5FSM9Ttw.svg?mode=light"></picture>
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/youtube/channel-views/UC_x5XG1OV2P6uZZ5FSM9Ttw.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/youtube/channel-views/UC_x5XG1OV2P6uZZ5FSM9Ttw.svg?mode=light"></picture>
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/youtube/views/dQw4w9WgXcQ.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/youtube/views/dQw4w9WgXcQ.svg?mode=light"></picture>
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/youtube/likes/dQw4w9WgXcQ.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/youtube/likes/dQw4w9WgXcQ.svg?mode=light"></picture>
Path Parameters
<picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/youtube/comments/dQw4w9WgXcQ.svg?mode=dark"><img alt="badge" src="https://shieldcn.dev/youtube/comments/dQw4w9WgXcQ.svg?mode=light"></picture>
Requires YOUTUBE_API_KEY environment variable. Get one from the Google Cloud Console with YouTube Data API v3 enabled.
Uses YouTube Data API v3. Requires API key. Cached 1 hour.