Dynamically Generated YouTube Stats for your GitHub Readmes

Dhyey Thumar
3 min readJan 21, 2021

Do you like to stream videos on software development on YouTube & like to share the source code via github?

If the answer to the above question is yes, then this article is valuable for you. Recently I created a project which dynamically generates YouTube Stats Card for the youtube channel and videos. These cards will give an aesthetic look on your Github profile readme and the repo readmes as compared to the normal youtube URL.

YouTube Stats Card allows you to simply add a markdown image link and it will show the real-time stats for your Channel and Videos as follows.

In this article, I will explain how to use this to generate elegant statistics for your YT channel and videos.

YouTube Channel Stats

![Dhyey's youtube channel stats](https://youtube-stats-card.vercel.app/api?channelid=UCpKizIKSk8ga_LCI3e3GUig&layout=extruded&theme=dark_pink)

The above link will generate the following stats card having layout as extruded and color theme as dark pink:

Dhyey’s youtube channel stats
YouTube Channel Stats Card

You can also customize the appearance of your Channel Stats Card with the following URL query params:

  • layout — Default, Center, Extruded (name)
  • hide_icons — Hide the icons from channel card (boolean)
  • hide_logo — Hide the logo from channel card (boolean)
  • theme — Name of the theme, choose from all available themes
  • hide_border — Hides the card’s border (boolean)
  • title_color — Card’s title color (hex color)
  • text_color — Body text color (hex color)
  • icon_color — Icons color if available (hex color)
  • bg_color — Card’s background color (hex color)
  • custom_title — Add the custom title to the channel card (use %20 to add space)
  • cache_seconds — set the cache header manually (min: 1800, max: 86400)

YouTube Video Stats

![Dhyey's youtube video stats](https://youtube-stats-card.vercel.app/api/video?videoid=4vwZNTagHsQ&layout=compact)

The above link will generate the following stats card having layout as compact and color theme as default:

Dhyey’s youtube video stats
YouTube Video Stats Card

You can also customize the appearance of your Video Stats Card with the following URL query params:

  • layout — Default, Compact (name)
  • hide_icons — Hide the icons from video card (boolean)
  • hide_preview — Hide the video preview from video card (boolean)
  • theme — Name of the theme, choose from all available themes
  • hide_border — Hides the card’s border (boolean)
  • title_color — Card’s title color (hex color)
  • text_color — Body text color (hex color)
  • icon_color — Icons color if available (hex color)
  • bg_color — Card’s background color (hex color)
  • hide_channelname — Hide the channel name in video card (boolean)
  • cache_seconds — set the cache header manually (min: 1800, max: 86400)

I hope you guys liked the project ✌. And make sure to give it a star on Github ⭐.

To view all the live demos, check out the github repo:

--

--

Dhyey Thumar

Working with Reinforcement Learning, Backend web development, & Computer Vision.